Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 300130

Provide a hook function to alter the skip fields in the hasTranslationChanges function in ContentEntityBase.php

$
0
0

Problem/Motivation

When using the multi-language website with the encrypted data field, we always get TRUE in hasTranslationChanges() even if we didn't modify the translation. The reason is the data stored in DB is [ENCRYPTED] instead of the real value. Which means we will always get the RevisionTranslatedAffected on all the languages when we update any one of the translation.

How to reproduce the scenario

1. Enable contribute module: https://www.drupal.org/project/encrypt
2. Enable multi-language settings on one of the content type. (EX: article)
3. Create a field with the encrypted type provided by the contributed module and check the field is translatable.
4. Create one article and translate the article with revision log filled with some text.
5. Check the column revision_translation_affected in node_field_data and node_field_revision database.

Proposed resolution

Provide the hook method to alter the skip fields that we can add our own skip fields when we run hasTranslationChanges()


Viewing all articles
Browse latest Browse all 300130

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>