The method prepare_panes() shuts "admin mode" on and off without any further considerations.
In the methods comment it says it's necessary to shut it on, but the hard coded shut off afterwards may mix up the admin mode state:
class panels_renderer_ipe extends panels_renderer_editor {
...
function prepare_panes($panes) {
// Set to admin mode just for this to ensure all panes are represented.
$this->admin = TRUE;
$panes = parent::prepare_panes($panes);
$this->admin = FALSE;
}
...
}
Easy fix to this issue:
class panels_renderer_ipe extends panels_renderer_editor {
...
function prepare_panes($panes) {
// Set to admin mode just for this to ensure all panes are represented.
$previous_admin_mode = $this->admin_mode;
$this->admin = TRUE;
$panes = parent::prepare_panes($panes);
$this->admin = $previous_admin_mode;
}
...
}
Comments
Comment #2
rashid_786 commentedcreated a patch for the changes.
Comment #3
rashid_786 commentedComment #4
drcolossos commentedWe are actually using this fix since we ran into the issue as well.
Comment #5
japerryHmm patch doesn't apply. I'm not certain $this->admin_mode is correct?
Comment #6
japerryDrupal 7 is no longer supported, closing.