- Issue created by @milos.kroulik
- πΊπΈUnited States tim bozeman
Oh yeah, that's true. The section storage could totally be a third_party_setting. Nice catch!
While trying to test the Umami demo with this module, I encountered errors at 2 places related to the layout builder:
<ul>
<li>/en/admin/config/user-interface/navigation-block</li>
<li>/en/admin/structure/types/manage/recipe/display
</ul>
They are almost same:
Drupal\Component\Plugin\Exception\ContextException: The entity context is not a valid context. in Drupal\layout_builder\Plugin\SectionStorage\SectionStorageBase->getContextDefinition() (line 150 of /app/web/core/lib/Drupal/Core/Plugin/ContextAwarePluginTrait.php).
The cause seems to be that code at https://git.drupalcode.org/project/navigation_plus/-/blob/1.0.x/src/Navi... assumes that layout builder is used for overriding layout of a content entity (for comparison, see https://www.drupal.org/project/layout_builder_perms/issues/3392780 π Drupal\Component\Plugin\Exception\ContextException: The entity context is not a valid context. Active ).
I managed to access those configuration interfaces with
try {
$entity = $parameter->getContextValue('entity');
} catch (ContextException $e) {
$entity = NULL;
}
I tried to follow installation instructions as mentioned on the project page.
Active
1.0
Code
Oh yeah, that's true. The section storage could totally be a third_party_setting. Nice catch!