Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
There's a couple things that will cause the Panels IPE to re-render a pane or the whole Panels display via AJAX:
- Editing a particular pane will re-render that pane via AJAX
- Saving will re-render the whole Panels display via AJAX
However, when rendering via AJAX, menu blocks will disappear. The reason they disappear is because they are figuring out the menu to display from the current path, and when rendering via AJAX, the current path is to the AJAX end-point -- not the original page.
When re-rendering a pane or a whole display via the Panels IPE, we should be minimally setting up Drupal's state to think it's at the original page so that menu blocks continue to render correctly.
Comment | File | Size | Author |
---|---|---|---|
#3 | panels-menu-block-ipe-2897658-3.patch | 2.29 KB | dsnopek |
#2 | panels-menu-block-ipe-2897658-2.patch | 1.87 KB | dsnopek |
Comments
Comment #2
dsnopekHere's a patch that solves the problem when saving in the IPE. The problem still happens when editing the menu block in the IPE.
Comment #3
dsnopekHere's a new patch that fixes editing panes too, but depends on this CTools patch #2897965: Wizard sets destination incorrectly
Comment #4
cboyden CreditAttribution: cboyden at UC Berkeley Web Platform Services commentedTested patch 3 in conjunction with #2897965: Wizard sets destination incorrectly and #2177417: Widget output when editing with IPE can be different than when viewing the page normally (easily reproducable with "Submenu" widget). It's working as expected. Still depends on the CTools patch.
Comment #5
cboyden CreditAttribution: cboyden commentedWe've been using this patch for the past few months, and it's working fine.
Comment #6
DamienMcKennaComment #7
joseph.olstadretriggered tests
Comment #8
joelpittetThanks @dsnopek, I've committed this to the dev branch for the next release.
Comment #10
ron_s CreditAttribution: ron_s commentedFYI, this patch has introduced a new bug in 7.x-3.10. Please review: https://www.drupal.org/project/panels/issues/3157925
Comment #12
joelpittet@dsnopek Could you have a peak at @ron_s issue in #3157925?