X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Flib%2FDrupal%2FCore%2FEntity%2FEntityChangesDetectionTrait.php;h=cde4d834ce8e11e758a79cfa7cc6e813a6b7145b;hb=5b8bb166bfa98770daef9de5c127fc2e6ef02340;hp=e598e8c0893e03722e086f9850860268e12c9c2a;hpb=af6d1fb995500ae68849458ee10d66abbdcfb252;p=yaffs-website diff --git a/web/core/lib/Drupal/Core/Entity/EntityChangesDetectionTrait.php b/web/core/lib/Drupal/Core/Entity/EntityChangesDetectionTrait.php index e598e8c08..cde4d834c 100644 --- a/web/core/lib/Drupal/Core/Entity/EntityChangesDetectionTrait.php +++ b/web/core/lib/Drupal/Core/Entity/EntityChangesDetectionTrait.php @@ -30,6 +30,13 @@ trait EntityChangesDetectionTrait { ]; $fields = array_merge($fields, array_values($entity_type->getRevisionMetadataKeys())); + // Computed fields should be skipped by the check for translation changes. + foreach (array_diff_key($entity->getFieldDefinitions(), array_flip($fields)) as $field_name => $field_definition) { + if ($field_definition->isComputed()) { + $fields[] = $field_name; + } + } + return $fields; }