diff -u b/core/modules/content_moderation/src/Plugin/Field/ModerationStateFieldItemList.php b/core/modules/content_moderation/src/Plugin/Field/ModerationStateFieldItemList.php --- b/core/modules/content_moderation/src/Plugin/Field/ModerationStateFieldItemList.php +++ b/core/modules/content_moderation/src/Plugin/Field/ModerationStateFieldItemList.php @@ -23,6 +23,10 @@ protected function getModerationState() { $entity = $this->getEntity(); + if (!\Drupal::service('content_moderation.moderation_information')->shouldModerateEntitiesOfBundle($entity->getEntityType(), $entity->bundle())) { + return NULL; + } + if ($entity->id() && $entity->getRevisionId()) { $revisions = \Drupal::service('entity.query')->get('content_moderation_state') ->condition('content_entity_type_id', $entity->getEntityTypeId()) @@ -55,7 +59,7 @@ // @see \Drupal\node\NodeTypeForm::form() $bundle_entity = \Drupal::service('content_moderation.moderation_information') ->loadBundleEntity($entity->getEntityType()->getBundleEntityType(), $entity->bundle()); - if ($bundle_entity && $bundle_entity->getThirdPartySetting('content_moderation', 'enabled') && ($default = $bundle_entity->getThirdPartySetting('content_moderation', 'default_moderation_state'))) { + if ($bundle_entity && ($default = $bundle_entity->getThirdPartySetting('content_moderation', 'default_moderation_state'))) { return ModerationState::load($default); } }