The simplemenu does not display on certain paths. This is caused by the condition logic in hook_init. The $theme variable is not available until after the theme system has been initialised.
I have corrected this by calling theme() which has the effect of initialising the theme system. I also removed a couple of needless globals and fixed the logic of the conditional so it works properly.
| Comment | File | Size | Author |
|---|---|---|---|
| simplemenu_theme_exclusion.patch | 723 bytes | psynaptic |
Comments
Comment #1
psynaptic commentedI should add that I tested it with a custom theme set from the user profile too and it works for me fine.
Comment #2
kndrIt works for me. Thanks. I had strange problem with simplemenu and fckeditor on certain paged (especially in node/*/edit). Your solution solved it.
Comment #3
psynaptic commentedThanks for testing! I hope this will be reviewed by the maintainer. :)
Comment #4
zroger commentedCalling any theme function in hook_init() is too early and disrupts normal theme initialization. #336119 is a result of this finding.
The extra global declarations have also been removed already. The conditional logic may still need to be changed.
Can you give a better description of the actual problem, and steps to recreate it.
Comment #5
jseffel commentedI've also tested the patch and it worked for me. The menu didnt show up node node/nid, node/nid/edit but it does now.
Comment #6
zroger commentedThis patch needs work.
Point blank, any call to theme() in the init function breaks the theme system in other places, so there is no chance of this patch getting committed as is.
Comment #7
psynaptic commentedThis came back when I updated simplemenu on a site I built a few weeks ago. I just removed:
..from line 35 and it's all working properly again now.
Comment #8
zroger commentedyou were definitely on the right track with $theme not being available in hook_init().
latest code only checks for theme from hook_footer().
Comment #9
zroger commentedCommitted to 6.x-1.2