Reviewed & tested by the community
Project:
SimpleMenu
Version:
6.x-1.10
Component:
User interface
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Aug 2010 at 10:25 UTC
Updated:
2 Jan 2014 at 19:06 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
rolf commentedHere a screen shot how it looks with the rubik theme. Same with Garland.
Comment #2
AlexisWilke commentedrolf,
If you suspect that the vertical is really causing this problem, you could delete that theme (simplemenu/themes/vertical) and see whether it fixes the problem.
My bet would be that it won't fix anything, but I do not know for sure.
Let me know.
Thank you.
Alexis
Comment #3
richardathome commentedJust had this happen to me after updating to the latest version (6.x-1.10).
The fix for me was to go to the module config page (www.example.com/admin/settings/simplemenu), and under Advanced settings change the SuperFish Version to 1.4.8 (was 1.4.1)
Hope this helps :-)
Comment #4
AlexisWilke commentedrichardathome,
Thank you for the info. I suppose I should switch the default to 1.4.8 now...
There could be another problem too which is too many CSS files. That happens on Internet Explorer only. The system performance can be used to turn on the CSS compression which fixes the problem. D7 uses @import instead which has no count limit.
Thank you.
Alexis
Comment #5
amateescu commentedActually, changing superfish to 1.4.8 doesn't solve anything :)
Every time you empty your cache, simplemenu resets to a vertical menu. I thinks it's some css file that doesn't get included but i'll have to dig deeper into this.
Andrei
Comment #6
AlexisWilke commentedAndrei,
You may want to check out this page for complimentary information:
http://www.m2osw.com/doc_simplemenu_known_issues
Today I ran into a problem with the glossyblue theme (which I do not recommend). They had some ul/li definitions that would overwrite the Simplemenu definitions.
Also, I just noticed that the main <div> would not be properly themed. The correct name is #simplemenu-block and not #simplemenu (which is the first <ul> tag.)
Thank you.
Alexis
P.S. The patch provided here uses #simplemenu-block when the top <div> is actually using a class: .simplemenu-block. Yet trying to use that instead of #simplemenu does not work too well. The problem was something else anyway.
Comment #7
amateescu commentedHey Alexis,
Thanks for your quick reply. This is not the problem described here (or at least not the one that I encountered using any theme).
The actual problem is this: when you empty your cache, everything in 'sites/default/files/css' gets deleted. The 'simplemenu_css_filename' system variable is still set and contains the old css filename.
So, the condition in simplemenu.module at line 134:
returns true but that file doesn't exist anymore.
A quick fix would be someting like:
Andrei
Comment #8
AlexisWilke commentedAndrei,
Weird I did not get the problem. I wonder why I never saw that with the current setup.
Please, try with the attached patch which clears the variable whenever the cache gets cleared.
Thank you.
Alexis Wilke
Comment #9
amateescu commentedHey,
That's a way better solution than mine :) With a small fix: boost_flush_caches() should be simplemenu_flush_caches().
Btw, earlier I raised this to critical because i think that many users who will upgrade to 1.10 or start using it directly will be hit by this issue. It would be great if a quick 1.11 release is possible :)
Thanks,
Andrei
Comment #10
amateescu commentedAlso, I think the function should return an empty array.
Andrei
Comment #11
AlexisWilke commentedAndrei,
If you return nothing (i.e. NULL) then the invoke does nothing with the result and the final result will be array().
I'll wait a few days to see whether anyone complains about this change and then create version 1.11 if no one complains.
Thank you.
Alexis
Comment #12
ccshannon commentedI just installed 6x-1.10 and everything unexpectedly went vertical. Emptying cache had no effect.
I disabled/uninstalled simplemenu 6x-1.10 completely and re-installed 6x-1.9 and everything is good again.
I will upgrade when 6x-1.11 is out, rather than 6x-1.10 and patch. Thanks.
Comment #13
felipe commentedSame issue/description here...
Comment #14
AlexisWilke commentedOkay, I created 1.12. At least, that fixes this issue that at first I had no idea what it could be.
I think that the problem is I use Boost and that keeps files in its own boost cache... so I did not see this side effect.
Thank you for your reports and patience!
Alexis
Comment #15
AlexisWilke commentedGo a duplicate here: #895676: Weird problems when rebuilding CSS/JS cache
Now I'm wondering whether an update could generate a problem by clearing the cache and not properly calling the simplemenu_flush_caches().
If you have any problem after an upgrade, don't hesitate to post here.
Thank you.
Alexis Wilke
Comment #16
echoz commentedUsing 6.x-1.12, set to use superfish 1.4.8.js, on D6.19, block caching disabled, I get the vertical simplemenu *only after saving the admin/build/modules page*. Consistently reproducible, and never happens in any other circumstance.
I get this on a few different sites. I had never had the issue before. Upon downgrading back to 1.9, I started getting the vertical menu more often, so I'm back at 1.12. Wanted to report the specific with the modules page in case it is a clue, and that it is not entirely fixed. Not really critical for us since clients don't save the modules page.
Comment #17
echoz commentedComment #18
AlexisWilke commentedRight now you can fix the issue by undoing #891114: simplemenu always changes css and js query strings resulting in huge bandwidth overhead
You can do so with the attached patch.
I'll have to get a website where I can reproduce the problem each time!? I have saved and never seen the problem, but I'll try with your settings sample to see whether that has an effect.
Thank you.
Alexis
Comment #19
AlexisWilke commentedThere is another patch that would force the regeneration of the file as proposed before (#7).
You may try this patch or don't bother and use #18.
I cannot reproduce the problem without manually going on the server and deleting files/css/simplemenu-*.css
Also, I noticed that this meant you did not have the CSS caching turned on. Otherwise the content of the CSS would be in the compressed version and thus stay available as required.
And I tried without Boost since Boost can cache CSS files and thus pages continue to work for a long time!
Note that Simplemenu is not a block so caching blocks or not should have no effect on Simplemenu...
Please, let me know whether this patch (#19) works for you. #18 is like 6.x-1.9 so I'm sure that will work. 8-)
Thank you.
Alexis
Comment #20
echoz commented#19 worked, I can no longer cause it to break with the vertical menu issue, thanks! I choose this rather than #18 since I wanted the benefit of the previous update.
Comment #21
amateescu commentedAlexis,
After some digging into the cache system (and cache related issues from other modules), this is what I found:
system_modules_submit() and system_themes_form_submit() calls drupal_clear_css_cache(). So, on every module and theme form submit, the css cache is cleared but hook_flush_caches() is not invoked. This is what you were wondering about in #15, but is not only related to this module's updates.
I think my proposal from #7 (your patch in #19) is the way to go :)
Andrei
Comment #22
AlexisWilke commentedAndrei,
Okay, got it! I have the Drupal core patch as defined here:
http://drupal.org/node/721400#comment-2950544
That prevents the deletion of CSS files for a few days (in the original version, it's 30 days.) That explains why I could not reproduce the problem and indeed the lack of callbacks shows clearly that we've got to test whether the file is there which sucks...
Thank you.
Alexis