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.

Comments

Jorrit created an issue. See original summary.

Jorrit’s picture

Status: Active » Needs review
StatusFileSize
new1.22 KB

Please see the attached patch.

  • IreneV committed 6ee4a23 on 7.x-2.x
    Issue #2944138 by Jorrit: panels_breadcrumbs calculates contexts twice...
IreneV’s picture

Thanks! Will be included into next release

IreneV’s picture

Status: Needs review » Fixed
Jorrit’s picture

Thank you!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.