Upon overriding an entity's display that previously had a default display selected, the following is repeated for all panes in the display:
Notice: Undefined index: new-253fc731-f7ac-4748-9586-0b37943c957e in panels_edit_display_form_submit() (line 162 of panels/includes/display-edit.inc).
Additionally, upon reloading, none of the panes will exist.
This appears to be related to an API change in either CTools 1.4 or Panels 3.4.
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | panelizer-n2229033-17.patch | 494 bytes | damienmckenna |
Comments
Comment #1
damienmckennaComment #2
damienmckennaComment #3
damienmckennaThis does not happen with the current -dev release, seems like it was fixed recently.
Comment #4
damienmckennaI just triggered this, so it's not fixed yet.
Comment #5
祥子 commentedHi DamienMcKenna,recently encountered a similar problem does not know how to deal with.Environment is CTools 1.4 and Panels 3.4.
Comment #6
mstiI can confirm this bug with ctools 1.4 and Panels 3.4 and panels-dev
ctools 1.4 and Panels 3.3 is OK
Comment #7
antonyanimator commentedI am receiving this error
Comment #8
greggmarshallHas anyone identified is the issue with Panelizer, Panels and/or CTools?
I can reliably reproduce the error and in that case it appears the PID of each panel is completely different between the existing panel definition and the update being saved. But I'm unclear on what the intended behavior should be.
In my example, the "old_content" is
While the new PIDs are
Thus the error when line 162 executes, since it is expecting a value
if ($old_content[$pid]) {I am assuming this is a side effect of the UUID change made in Panels/CTools from #1277908: Introduce UUIDs onto panes & displays for better exportability & features compatibility.
Comment #9
jonmcl commentedUgh. This one was just driving me crazy. I think it is indeed related to #1277908: Introduce UUIDs onto panes & displays for better exportability & features compatibility and the addition of random UUID strings to the panel ID's of the default display.
This is an issue when configuring an entity bundle's default Panelizer display for the first time. From what I can gather, the default setting (the fields and such that need to be added to the display as panes) is generated over and over again each time
panelizer_default_content_pageis called. Each time it is called, new random UUIDs are generated and things never match up when you try and save the display. You can even see an error if you try and disable one of the default field panes that are added ("Invalid Pane ID" AJAX error comes back).I think the solution is to store the newly generated default display so that it can be used, with the same random UUID panel IDs, over and over again.
Since this is my first time ever looking at the Panels / Panelizer code, I'm not going to submit a patch because there are likely issues with my solution :) But here it is for smarter minds to review.
In
panelizer_default_content_page($handler, $bundle, $name, $view_mode)ofpanelizer/includes/admin.incchange:to
The only problem I can see with solving the issue this way is that if the site builder does not submit or cancel the form, the default display will be cached and re-used the next time and it might not contain newly added fields that it should. So it might be a good idea to clear this object when "Provide initial display" option is first turned on for a particular view mode.
Comment #10
jonmcl commentedWhoops.. didn't quite work because the page reloads after a save or cancel and the ctools_object_cache objects keeps getting re-saved.
So it should be:
Comment #11
damienmckennaThe code from #10 in patch format.
Comment #12
uzlov commentedpanelizer-n2229033-11.patch - seems like this patch is not correct
need to change panelizer/includes/admin.inc
added correct patch
Comment #14
uzlov commentedfixed patch
Comment #15
uzlov commentedpatch with correct name
Comment #16
damienmckennaComment #17
damienmckennaPatch #15 with the correct file path.
Comment #19
damienmckennaThis solved the problem in my local testing. Thanks uzlov! Committed.
Comment #22
damienmckenna(reverted and committed a second time so that proper attribution could be given to uzlov)