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

jplomona’s picture

Issue summary: View changes

I was able to reproduce this issue. I updated the summary to reflect my experience.

dsnopek’s picture

Version: 7.x-1.11 » 7.x-1.x-dev
Component: Miscellaneous » Core
Priority: Normal » Critical

Thanks! This looks like a very serious issue, so I'm marking as Critical to make sure it gets addressed before the next release.

dsnopek’s picture

I 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!

dsnopek’s picture

I've started to do some debugging and here's what I've found:

  • The default panel comes from PanelizerEntityNode::get_default_display()
  • Looking at where the warning is coming from (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).

dsnopek’s picture

I 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.

dsnopek’s picture

I think this will be fixed by updating to the latest Panelizer: #2429549: Update to latest Panelizer