Drupal\Component\Plugin\Exception\ContextException: The entity context is not a valid context.

Created on 10 October 2023, about 1 year ago

Problem/Motivation

Navigating to Manage Layout for a content type display yields the exception:

Drupal\Component\Plugin\Exception\ContextException: The entity context is not a valid context. in Drupal\layout_builder\Plugin\SectionStorage\SectionStorageBase->getContextDefinition() (line 184 of /var/www/docroot/core/lib/Drupal/Core/Plugin/ContextAwarePluginTrait.php).

This is because there is no entity context for a display. The code assumes you are managing the layout for an individual content node.

Steps to reproduce

Navigate to a view display that is Layout Builder enabled.

Proposed resolution

Check if the context is valid.

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ› Bug report
Status

Active

Version

2.1

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States john.oltman

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024