Viewing Layout Builder enable node fails after Workflow enabled on bundle if another node was created before enabling

Created on 21 May 2019, about 5 years ago
Updated 10 December 2023, 6 months ago

Problem/Motivation

steps to reproduce

  1. install standard profile
  2. enable layout builder and content moderation
  3. enable layout builder on Basic page(don't need overrides)
  4. Create a Basic Page node
  5. Enable the "Editorial" workflow for Basic Page
  6. Create another Basic Page node
  7. Fail on saving

error

Drupal\Component\Plugin\Exception\ContextException: Assigned contexts were not satisfied: entity in Drupal\Core\Plugin\Context\ContextHandler->applyContextMapping() (line 150 of core/lib/Drupal/Core/Plugin/Context/ContextHandler.php)

#45 I got

warnings like

Warning: Undefined array key โ€œproviderโ€ in shortcut_preprocess_block() (line 241 of core/modules/shortcut/shortcut.module).

And

This block is broken or missing. You may be missing content or you might need to enable the original module.

At the bottom.

But the actual problem is in \Drupal\layout_builder\SectionComponent::getPlugin()

$plugin = $this->pluginManager()->createInstance($this->getPluginId(), $this->getConfiguration());

the id of the plugin will be extra_field_block:node:page:content_moderation_control and this will return and instance of \Drupal\Core\Block\Plugin\Block\Broken

Proposed resolution

Ensure that when there are new extra fields we clear the block cache.

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

๐Ÿ› Bug report
Status

Fixed

Version

10.2 โœจ

Component
Layout builderย  โ†’

Last updated about 15 hours ago

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States tedbow Ithaca, NY, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024