When adding a new content type on a Panopoly site, an error occurs after trying to change the order in which the panels were displayed.
Steps I took to replicate:
1. Create new Panopoly site
2. Create new Content Type "Content1":
3. Panelizer > Panelize
4. Panelizer > Full page override > Panelize + Provide default panel
5. Structure > Content types > Select panelizer for content named Name1
6. Re-arrange some panels
7. Save
Results:
1. Error message --> Undefined index on line 162 of panopoly/modules/contrib/panels/includes/display-edit.inc
2. Panels displayed in Content disappear, any pages created with content type appear empty
Comments
Comment #1
jplomona CreditAttribution: jplomona commentedI was able to reproduce this issue. I updated the summary to reflect my experience.
Comment #2
dsnopekThanks! This looks like a very serious issue, so I'm marking as Critical to make sure it gets addressed before the next release.
Comment #3
dsnopekI just tested this myself. I'm able to reproduce! The panes remain (ie. don't mysteriously disappear) on subsequent saves, so this isn't as ultra-critical as I originally thought it was. But it's still an important bug!
Comment #4
dsnopekI've started to do some debugging and here's what I've found:
PanelizerEntityNode::get_default_display()
panels_edit_display_form_submit()
in panels/includes/display-edit.inc, the problem is that the panes in$form_state['values']['panel']['pane']
have different UUIDs, than the panes in$display->content
.I suspect the problem is that the display is generated in code when the form is first shown (with a set of UUIDs created automatically), and then it's generated again when the form is submitted (with a completely different set of UUIDs created automatically again).
Comment #5
dsnopekI think this is a Panelizer bug connected with the change in Panels to identify panes via a UUID, rather than an incrementing integer, which was a couple versions ago.
I created a bug in the Panelizer queue: #2455051: When saving the default Panel for a new content type, all the default panes that were originally there disappear!
I'm going to reduce this from Critical to just a normal bug.
Comment #6
dsnopekI think this will be fixed by updating to the latest Panelizer: #2429549: Update to latest Panelizer