summaryrefslogtreecommitdiffstats
path: root/core/modules/content_moderation/src/Entity
diff options
context:
space:
mode:
authorNathaniel Catchpole2017-07-20 16:17:26 (GMT)
committerNathaniel Catchpole2017-07-20 16:17:26 (GMT)
commit75fdbf087c9babfd4daba93fe65b0570b358304d (patch)
treebdf02827c0129ed888e184812fd070940c41c8d7 /core/modules/content_moderation/src/Entity
parentdb4cb40e135a12d7371680c9439e6131f7a2af4e (diff)
Issue #2766957 by timmillwood, vijaycs85, plach, Sam152, Gábor Hojtsy, catch, dawehner, alexpott, hchonov: Forward revisions + translation UI can result in forked draft revisions
Diffstat (limited to 'core/modules/content_moderation/src/Entity')
-rw-r--r--core/modules/content_moderation/src/Entity/Handler/ModerationHandler.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/modules/content_moderation/src/Entity/Handler/ModerationHandler.php b/core/modules/content_moderation/src/Entity/Handler/ModerationHandler.php
index 62e504e..203022d 100644
--- a/core/modules/content_moderation/src/Entity/Handler/ModerationHandler.php
+++ b/core/modules/content_moderation/src/Entity/Handler/ModerationHandler.php
@@ -33,6 +33,11 @@ class ModerationHandler implements ModerationHandlerInterface, EntityHandlerInte
// This is probably not necessary if configuration is setup correctly.
$entity->setNewRevision(TRUE);
$entity->isDefaultRevision($default_revision);
+ if ($entity->hasField('revision_translation_affected')) {
+ // @todo remove this when revision and translation issues have been
+ // resolved. https://www.drupal.org/node/2860097
+ $entity->set('revision_translation_affected', TRUE);
+ }
// Update publishing status if it can be updated and if it needs updating.
if (($entity instanceof EntityPublishedInterface) && $entity->isPublished() !== $published_state) {