When combining panels, panelizer and using a fieldable pane, display suite throws this error (This happened using Panopoly) :
Notice: Undefined index: #fieldable_panels_pane in ds_extras_render_panel_layout()

There is something wrong in the way ds_extras_render_panel_layout() expects the entity to be passed to variables, not all entities have a $vars['#(entity_type)'] variable. With fieldable_panes, the entity is located at $vars['#element']. This may probably happen in other cases, so I created a generic fallback in cases it does not find the entity where it expects it.

Patch attached.

CommentFileSizeAuthor
ds_extras_entity_var.patch593 bytesjide

Comments

swentel’s picture

Status: Needs review » Needs work

I'm not sure that this fallback will work. The annoying problem is that any entity more or less choses what the name of the key will be. So, the patch should basically check if the entity type is a fieldable panel pane or not. I know it sounds stupid, but I don't see any other good way for now.

swentel’s picture

Status: Needs work » Closed (won't fix)

Panel view modes support is discontinued and the code will be gone in the 7.x-2.x of Display Suite. From now on you can use the 7.x-3.x branch of Panelizer now that #1361530: Allow default Panel/layout per view mode is committed.