Skip to content
Snippets Groups Projects

[#3338260] Added a condition to skip changing affected flag

1 file
+ 7
0
Compare changes
  • Side-by-side
  • Inline
@@ -1014,6 +1014,13 @@ protected function hasFieldValueChanged(FieldDefinitionInterface $field_definiti
* An entity object being saved.
*/
protected function populateAffectedRevisionTranslations(ContentEntityInterface $entity) {
// Skip changing affected flag if the entity is syncing and
// the existing revision is updated instead of creating a new one.
// Uses for the content import and migration, when we need to keep
// the field value for the old revisions.
if ($entity->isSyncing() && !$entity->isNewRevision()) {
return;
}
if ($this->entityType->isTranslatable() && $this->entityType->isRevisionable()) {
$languages = $entity->getTranslationLanguages();
foreach ($languages as $langcode => $language) {
Loading