X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fcontent_moderation%2Fsrc%2FEntity%2FContentModerationState.php;fp=web%2Fcore%2Fmodules%2Fcontent_moderation%2Fsrc%2FEntity%2FContentModerationState.php;h=abb92eb8411ebedef8196d35f17e676dc1133cc3;hp=e54fbbe2a8203e5d835815eea94997dfcaa987bc;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/web/core/modules/content_moderation/src/Entity/ContentModerationState.php b/web/core/modules/content_moderation/src/Entity/ContentModerationState.php index e54fbbe2a..abb92eb84 100644 --- a/web/core/modules/content_moderation/src/Entity/ContentModerationState.php +++ b/web/core/modules/content_moderation/src/Entity/ContentModerationState.php @@ -31,6 +31,7 @@ use Drupal\user\UserInterface; * data_table = "content_moderation_state_field_data", * revision_data_table = "content_moderation_state_field_revision", * translatable = TRUE, + * internal = TRUE, * entity_keys = { * "id" = "id", * "revision" = "revision_id", @@ -221,4 +222,16 @@ class ContentModerationState extends ContentEntityBase implements ContentModerat return parent::save(); } + /** + * {@inheritdoc} + */ + protected function getFieldsToSkipFromTranslationChangesCheck() { + $field_names = parent::getFieldsToSkipFromTranslationChangesCheck(); + // We need to skip the parent entity revision ID, since that will always + // change on every save, otherwise every translation would be marked as + // affected regardless of actual changes. + $field_names[] = 'content_entity_revision_id'; + return $field_names; + } + }