I created a custom pane style (.inc plugin file). It does not include a 'render region' definition but a 'pane settings form' as described in #1178086-6: Custom pane style with a settings form.
When i select this style for a pane, click "next" but do *not* hit "save" at the second screen but close the popup instead.
After i hit "update&save" at panels configuration and checking region style setting it shows the pane style name which was never available to select for a region by intention.
The panel itself - when requested by the browser - throws
Notice: Undefined index: render region in panels_renderer_standard->render_region() (line 642 of /sites/all/modules/contrib/panels/plugins/display_renderers/panels_renderer_standard.class.php).
...and no pane is shown.
Do i have to define always a 'render region' as well?
Reproduced with plain drupal 7.26 and panels 7.x-3.4 and 7.x-3.x-dev.
Comment | File | Size | Author |
---|---|---|---|
#5 | panels-editor-cache-fix-2238025-05.patch | 2.17 KB | jhedstrom |
Comments
Comment #1
rokr CreditAttribution: rokr commentedComment #2
rokr CreditAttribution: rokr commentedTo reproduce just put this file named 'issue.inc' at sites/all/modules/panels/plugins/styles
Comment #3
jhedstromSeeing this as well. Looking into a solution.
Comment #4
jhedstromI've tracked this down to the panels cache that is maintained during editing. When a user skips out of a multi-step style settings form, the
$this->cache->style
is still set. That, combined with the logic inpanels_renderer_editor::get_style()
is what sets the style for regions to the style that was being configured for a pane:The issue is the
if (isset($this->cache->style)) {
logic doesn't care that it might be set for a pane.I think the fix here is to allow the style cache to be unset when a user clicks the close button on the modal without completing the form. I am unsure how to go about that bit.
Comment #5
jhedstromThanks to merlinofchaos and jappery in IRC, I was able to find a fix that binds the closing of the CTools modal to trigger a click on the cancel button. Note the cancel button did not yet exist, but this patch adds that as well.
Comment #6
heddnHad the same scenario as described in op and couldn't figure out how to reproduce for quite a while. Once I stumbled across this issue, I'm able to reproduce the issue without issue.
And the patch in #5 solves it.
Comment #7
jhedstromBumping priority up for visibility. When this issue happens, it hugely impacts the panel being edited, which I would say warrants a critical priority.
Comment #8
japerryLooks good. Committed!