If you change the layout of a Page Manager page or a panelized node using the IPE, the IPE buttons do not reappear at the bottom of the page after saving. You have to reload the page to get them to reappear.
Versions in use:
- CTools / Page Manager 7.x-1.10+0-dev
- Panels 7.x-3.6+8-dev plus the patch in #2787103: IPE with Page Manager permission no longer works
- Panelizer 7.x-3.4+0-dev
To reproduce:
- Install Drupal 7.50.
- Download and enable the latest dev versions of CTools, Panels and Panelizer, including Page Manager and the Panels IPE.
- Log in as an administrator.
- Create a Page Manager page as a Panel variant with a path and a normal menu entry. Set the renderer to In-Place Editor.
- Save the Page Manager page.
- View the Page Manager page.
- Click the IPE Change layout button.
- Choose a layout in the CTools modal.
- Click Save.
- Note that the IPE buttons do not appear at the bottom of the page.
- Reload the page.
- Note that the IPE buttons reappear.
The same issue occurs when you change layout of a panelized node with the IPE.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | panels-ipe-layout-fix-2787241-4.patch | 920 bytes | dsnopek |
Comments
Comment #2
dsnopekThanks for the report! Targeting for today's release. We'll try to reproduce and fix later.
Comment #3
dsnopekI can reproduce follow the instructions in the IS. This is caused by #2462331: IPE insufficient for Panelizer (data loss when using revisions) somehow - if I revert to the commit before, then it works, and switching to that exact commit exhibits the issue.
Thanks so much for testing the -dev version of Panels! We're trying really hard to get a release out today that fixes the regressions in 3.6.
Comment #4
dsnopekHere's a patch that works in my testing. To be honest, I'm not entirely sure why it works. I think it might be because there is no new cache key created when changing the layout, so when we regenerate the buttons they don't get processed by Javascript (because Javascript thinks it already processed those buttons). But this code is confusing - all's I really know is reverting this tiny hunk from #2462331: IPE insufficient for Panelizer (data loss when using revisions) fixes it.
Comment #5
japerryA long standing bug we've seen here is the existing page looking weird (wrong styles being applied) after save, which also requires reloading the page.
We also ran into issues with re-opening IPE after saving an IPE layout or changing the content. So I think the issue will probably need a bit more investigation if we want to fully fix it.
There are a slew of issues that have similar display mangling issues after save. I'm not sure if we want to try to tackle any of these to see if the underlying problem is related, or just get this one fixed and do a release ;)
#1402860: Panelizer is incompatible with moderation
#1621014: Contextual links and other JavaScript behaviors on panes don't work after clicking "Cancel" in IPE
#2447553: IPE uses ajax callback instead of parent page alias as return value
#1520492: Saving a change in the IPE results in a blank page, fine after refresh, no error
#1572202: IPE changes aren't shown after second save without page refresh
Comment #6
dsnopekThis is a little different than wrong styles - the IPE buttons (like "Customize page" and "Change layout") disappear so the IPE fails to work at all afterward. Also, we know the underlying cause because we committed it yesterday: #2462331: IPE insufficient for Panelizer (data loss when using revisions) ;-)
The part that I don't know, is why regenerating the buttons works fine for "Customize page" but doesn't work for "Change layout".
However, I definitely think fixing this is within scope for 7.x-3.7, or we'll be causing more regressions!
Comment #8
japerry