My system:
Drupal 7.7
many modules (but only 2 that call hook_custom_theme (system(core) & admin_theme)
MacOS X Lion
I just installed this module to solve the issue of forcing all user/*/* pages NOT using the Admin theme.
I'm not sure how the module was intended to function, but the hook_custom_theme() function returns nothing when the Admin page is NOT supposed to be displayed.
Problem is, the system_custom_theme() function is already setting the theme to be the "Admin Theme" so it is the theme that gets "popped off" in the hook that calls hook_custom_theme(). In addition, the calling function expects the "theme" returned to be of the form array('theme name'), not a string 'theme name', so I fixed the return of admin_theme as well.
I made the changes included in the attached patch to fix mine so it would work on my system.
Hopefully this helps others.
Andrew.
Comment | File | Size | Author |
---|---|---|---|
#1 | fix-to-work-with-d7-v2.patch | 1.13 KB | adf1969 |
fix-to-work-with-d7.patch | 1.17 KB | adf1969 |
Comments
Comment #1
adf1969 CreditAttribution: adf1969 commentedPatching my own patch...
It turns out the final "return" needs to return nothing (so if the page was already being handled by "system" it will remain so).
So, the attached patch is the new-and-improved patch that works better.
Comment #2
sgabe CreditAttribution: sgabe commentedI have encountered the same bug: I couldn't exclude node/add/[content-type] paths from using the administration theme. The patch in #1 seems to work fine.
Comment #3
cmseasy CreditAttribution: cmseasy commentedpatch #1 worked for me too
Comment #4
muschpusch CreditAttribution: muschpusch commented+1 for committing this! I'm setting this to major since the whole 'not showing admin theme' part isn't working...
Comment #5
davyvdb CreditAttribution: davyvdb commentedCommitted. Thx!