Outset
In panels_everywhere_page_build() if you just have the variable 'panels_everywhere_site_template_enabled' set to TRUE (but you don't have 'panels_everywhere_site_template_per_theme' set to TRUE) you eventually reach this code path (see here):
if (!variable_get('panels_everywhere_site_template_enabled_admin', FALSE)) {
$admin_theme = variable_get('admin_theme', '0');
if ($admin_theme && $admin_theme == $theme) {
return FALSE;
}
}
return TRUE;
(Note that this is in panels_everywhere_should_override() which is called from panels_everywhere_page_build(). TRUE then means that the override will be applied and FALSE means in won't.)
I'm assuming here that 'panels_everywhere_site_template_enabled_admin' is not set to TRUE.
If one sets the 'Admin theme' setting to 'Default theme' in the UI, the 'admin_theme' variable gets set to '0' and, accordingly, the if ($admin_theme) part returns FALSE (because (bool) '0' === FALSE). Therefore the entire code block above returns TRUE.
Problem
If one sets the 'Admin theme' to the actual default theme, then the 'admin_theme' variable gets set to the theme name, e.g. 'bartik'. In that case the entire code above returns FALSE (because (bool) 'bartik' === TRUE) and, thus, the site template is not applied.
Arguably, this is a misconfiguration, but since it is pretty hard to debug I would suggest to add an additional check so that the if () in the code block above becomes
if ($admin_theme && $admin_theme == $theme && $admin_theme != variable_get('theme_default', 'bartik')) {
I have not marked this as a bug, though, because it is sovable very simply by simply setting the 'Admin theme' to 'Default theme' in the UI. (You have to realize that that is the problem, however...)
I will provide a patch in #1.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 1959130-1-panels-everywhere-admin-default-theme.patch | 839 bytes | tstoeckler |
Comments
Comment #1
tstoecklerHere we go. Feedback (as always :-)) appreciated!
Comment #2
damienmckennaSeems like a bug.
Comment #3
j-leeI've got the same issue. The patch works fine for me.
Thank you.
Comment #5
damienmckennaCommitted. Thanks.