Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / lib / Drupal / Core / Entity / EntityChangesDetectionTrait.php
index e598e8c0893e03722e086f9850860268e12c9c2a..cde4d834ce8e11e758a79cfa7cc6e813a6b7145b 100644 (file)
@@ -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;
   }