diff --git a/core/modules/content_moderation/src/Entity/Handler/ModerationHandler.php b/core/modules/content_moderation/src/Entity/Handler/ModerationHandler.php index 7bbe757..48280e6 100644 --- a/core/modules/content_moderation/src/Entity/Handler/ModerationHandler.php +++ b/core/modules/content_moderation/src/Entity/Handler/ModerationHandler.php @@ -30,6 +30,12 @@ public static function createInstance(ContainerInterface $container, EntityTypeI * {@inheritdoc} */ public function onPresave(ContentEntityInterface $entity, $default_revision, $published_state) { + // The 'new_revision' property is used by NodeType, and the 'revision' + // property is used by BlockContentType to denote if new revisions should be + // created. If these are not set we will enforce new revisions. + if (!$entity->getEntityType()->get('new_revision') && !$entity->getEntityType()->get('revision')) { + $entity->setNewRevision(TRUE); + } $entity->isDefaultRevision($default_revision); }