summaryrefslogtreecommitdiffstats
path: root/core/modules/content_moderation/content_moderation.module
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/content_moderation/content_moderation.module')
-rw-r--r--core/modules/content_moderation/content_moderation.module9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/modules/content_moderation/content_moderation.module b/core/modules/content_moderation/content_moderation.module
index 09ade0d..5a7af0e 100644
--- a/core/modules/content_moderation/content_moderation.module
+++ b/core/modules/content_moderation/content_moderation.module
@@ -129,9 +129,6 @@ function content_moderation_form_alter(&$form, FormStateInterface $form_state, $
/**
* Implements hook_preprocess_HOOK().
- *
- * Many default node templates rely on $page to determine whether to output the
- * node title as part of the node content.
*/
function content_moderation_preprocess_node(&$variables) {
\Drupal::service('class_resolver')
@@ -287,7 +284,11 @@ function content_moderation_workflow_insert(WorkflowInterface $entity) {
* Implements hook_ENTITY_TYPE_update().
*/
function content_moderation_workflow_update(WorkflowInterface $entity) {
- content_moderation_workflow_insert($entity);
+ // Clear bundle cache so workflow gets added or removed from the bundle
+ // information.
+ \Drupal::service('entity_type.bundle.info')->clearCachedBundles();
+ // Clear field cache so extra field is added or removed.
+ \Drupal::service('entity_field.manager')->clearCachedFieldDefinitions();
}
/**