If Page Manager is disabled for a specific entity, e.g. node_view is disabled via "admin/structure/pages", then Panelizer should not be loaded for any pages for that entity. However, because Panelizer directly implements hook_entity_view_alter(), it will still attempt to load the configuration for the 'default' display mode.

In addition, if the entity is not enabled via Page Manager but the 'default' view mode for that entity is panelized and there are no displays configured, the pages end up not having anything displayed in the content area and a number of errors get displayed on those node pages:

  • Notice: Undefined index: default in panelizer_entity_view_alter() (line 291 of panelizer.module).
  • Notice: Undefined index: content in PanelizerEntityDefault->preprocess_panelizer_view_mode() (line 2595 of plugins/entity/PanelizerEntityDefault.class.php).
CommentFileSizeAuthor
#3 panelizer-n2223493-3.patch502 bytesDamienMcKenna
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DamienMcKenna’s picture

Title: Errors if a panelized view mode does not have a display configured » Panelizer attempts to load when it shouldn't
Issue summary: View changes

With a little digging, found out more details about this problem.

DamienMcKenna’s picture

I'm tempted to fix the errors so that the page display fails back to the normal template, and improve the UX around the 'default' view mode, but otherwise leave the functionality as-is.

DamienMcKenna’s picture

Status: Active » Needs review
FileSize
502 bytes

This resolves the error.

DamienMcKenna’s picture

Status: Needs review » Fixed

Committed.

  • Commit 5155ea7 on 7.x-3.x by DamienMcKenna:
    Issue #2223493 by DamienMcKenna: Don't attempt to load a Panelizer...

Status: Fixed » Closed (fixed)

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