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:

To reproduce:

  1. Install Drupal 7.50.
  2. Download and enable the latest dev versions of CTools, Panels and Panelizer, including Page Manager and the Panels IPE.
  3. Log in as an administrator.
  4. Create a Page Manager page as a Panel variant with a path and a normal menu entry. Set the renderer to In-Place Editor.
  5. Save the Page Manager page.
  6. View the Page Manager page.
  7. Click the IPE Change layout button.
  8. Choose a layout in the CTools modal.
  9. Click Save.
  10. Note that the IPE buttons do not appear at the bottom of the page.
  11. Reload the page.
  12. Note that the IPE buttons reappear.

The same issue occurs when you change layout of a panelized node with the IPE.

CommentFileSizeAuthor
#4 panels-ipe-layout-fix-2787241-4.patch920 bytesdsnopek

Comments

cboyden created an issue. See original summary.

dsnopek’s picture

Thanks for the report! Targeting for today's release. We'll try to reproduce and fix later.

dsnopek’s picture

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

dsnopek’s picture

Status: Active » Needs review
StatusFileSize
new920 bytes

Here'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.

japerry’s picture

A 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

dsnopek’s picture

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

  • japerry committed b47ab12 on 7.x-3.x authored by dsnopek
    Issue #2787241 by dsnopek, cboyden, japerry: IPE buttons do not reappear...
japerry’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.