I have a panelized node with a node add form context. While debugging the page I noticed that this form context was created twice. It appeared that panels_breadcrumbs_panelizer_pre_render_alter() calculates the contexts with the following code:
$panelizer_entity_plugin = panelizer_entity_plugin_get_handler($entity_type);
$contexts = $panelizer_entity_plugin->get_contexts($panelizer);
This is not necessary, as the contexts are already present in $display->context, where it is set by PanelizerEntityInterface::render_entity(). This function also invokes the panelizer_pre_render hook, so I am confident that this code can be safely changed.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 2944138-panels_breadcrumbs-context-optimize-2.patch | 1.22 KB | Jorrit |
Comments
Comment #2
Jorrit commentedPlease see the attached patch.
Comment #4
IreneV commentedThanks! Will be included into next release
Comment #5
IreneV commentedComment #6
Jorrit commentedThank you!