D7 dhtml_menu - When clear cache - module stops working.
upon clearing the cache the dhtml menu module stop working and all menu links become unstyled due to the class "dhtml-menu" not being applied to the div elements. When viewing the source of the page, it does show the dhtml js and css file being loaded.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | dhtml_menu-when_clear_cache_module_stops_working-1473354.patch | 4.8 KB | Sokarion |
Comments
Comment #1
nastenka commentedI have the same problem
Comment #2
sketman commentedthe same problem here.
Comment #3
tahiticlic commentedSame here, don't know why. It seems that a solution (worked for me) is :
Comment #4
tahiticlic commentedHi,
the problem has occured again. Further looking at the code has shown that the
dhtml_menu_preprocess_menu_linkhook is not invoked when the problem occurs, this means that the registry is not correctly filled.Wheter this is
dhtml_menu_initthat is not invoked when refreshing cache (and then refreshing registry) or it isdhtml_menu_preprocess_menu_linkitself that is not considered.For both possible cause, putting the
dhtml_menu.theme.incfile inclusion outside ofdhtml_menu_initcall withat the top of
dhtml_menu.modulecorrects it.BUT, this is not a good practice to do this (http://drupal.org/node/1751704) and the real cause of the problem should be found.
Comment #5
bensey commentedWell due to the lack of inactivity here, it seems that not that many people are having this issue?
It's happening for me, and in my opinion is such a serious issue that it renders the module unusable.
Having all of your DHTML menus break on a cache clear is crazy.
Anyways, as Fabien points out above, it seems that the
hook_preprocessfunction is not picked up when clearing caches. This seems to be happening as it is inside thedhtml_menu.theme.incfile.The solution for me was to simply move all of the functions in the
dhtml_menu.theme.incinto thedhtml_menu.modulefile, and remove themodule_load_includefrom thedhtml_menu_initfunction.After this when clearing caches the hook is always registered correctly.
If people think this is a workable solution, I'd be happy to submit it a patch so we could get this committed.
Comment #6
joewickert commentedHaving same problem here. Patch would be great.
Comment #7
jon pollard commentedIs this the reason for this module no longer being supported?
Comment #8
cburschkaHi, sorry; I haven't worked on this module in years, and there has never been a stable release for D7 (let alone an attempt at a D8 port).
I would now recommend that people use Nice Menus instead, which is actively supported and has a very similar feature set. But I would also be open to passing this project to a new maintainer.
Comment #9
jon pollard commentedHi cburschka, thanks for your response. What would be needed to keep the module active and not marked as a security issue?
Comment #10
charukah commentedhi cburschka thank you for great module. Is that module will stable in near feature its use in our production site please send me the update
Comment #11
alienzed commentedI am also curious to know why this module has suddenly been giving a security warning with little to no information of any kind explaining why. The sites that I run that use this still work fine but now think they are insecure. What gives?
Comment #12
Sokarion commentedThis is my patch to apply the solution of comment #5 from bensey