I had a similar issue to #542948: Javascript error causing problems with other modules, but the fix that was rolled into subsequent releases didn't fix the problem.
Firefox's console shows an error of:
Error: simplemenu is not defined
Source File: https://[my domain]/sites/all/modules/simplemenu/simplemenu.js?n
Line: 15
As a result, collapsible fieldsets and FCKeditor both broke on my site.
Rolling back to Simplemenu 6.x-1.4 restored normal functionality.
While things were broken, I cleared the theme registry, site cache, and browser cache several times without improving matters.
Comments
Comment #1
AlexisWilke commentedI'm using FCKeditor, and obviously I have collapsible fieldsets...
If you cleared the site cache, then it would have made the new JS that gets created to include the simplemenu variable declaration.
The new default is to cache the menu:
It is also to put the simplemenu variable in the header rather than the footer:
I would try to play with those two flags to see whether I'd get the same results as 1.4.
Also, you should verify that you indeed get the JS file with the simplemenu variable under:
drupal-path/sites/your-site/files/js/simplemenu-*.js
The * represents the md5() of the content of the file.
Comment #2
kassissieh commentedI can't access the SimpleMenu settings, because they are contained in collapsible fieldsets! Ironic, isn't it?
Comment #3
AlexisWilke commentedIf you edit the simplemenu.admin.inc and change all the fieldset '#collapsible' => TRUE entries with FALSE instead, that should at least give you access to the settings.
The fieldset uses JavaScript, and if it appears after the simplemenu variable that fails it would indeed stop working.
Thank you.
Alexis
Comment #4
AlexisWilke commentedAs a side note, the fix that you referenced in your first post is still in the software. It appears in the simplemenu_enabled() function itself which is much more sensible since that way anyone calling the function gets the same result.
Thank you.
Alexis
Comment #5
AlexisWilke commentedOkay, I added a test in the JavaScript so if the simplemenu variable is "undefined" I exit the JS. That means you won't get the Simplemenu (obviously) but then we should be able to test all the options without having to tweak anything else.
Thank you.
Alexis
P.S. new -dev version available in 12h.
Comment #6
echoz commentedI think related or the same bug, we discovered that after installing SimpleMenu 6.x-1.7, using insert 6.x-1.0-beta4 http://drupal.org/project/insert results in an empty image tag inserted in the textarea. Taking a clue from this issue, downgrading to SimpleMenu 1.4 allows insert to function normally. I've cross posted at the insert issue queue http://drupal.org/node/622630#comment-3153246, since this combination is new to both reports, and hopefully might be helpful.
Comment #7
echoz commented@AlexisWilke - I didn't change the status, did you? I believe I had the issue open while you were writing your post. I'll test the new version.
Comment #8
echoz commentedThe dev version has fixed the #6 bug with insert.
Comment #9
AlexisWilke commentedechoz,
Does the menu work at all for you?
I checked the JS code in insert, but they generate quite a bit of JS data too... so I'll have to run the module to see what they generate.
Thank you.
Alexis
P.S. I changed the status, you're supposed to change it back to active whenever you answer. 8-)
Comment #10
echoz commentedhere we go, posting at the same time again
Comment #11
kassissieh commentedI upgraded to version 1.8 today and tested as follows:
- SimpleMenu does not appear, but JavaScript continues to work elsewhere sitewide (collapsible fieldsets, FCKeditor).
- Checked settings: set scope to footer, cache the simplemenu variable, SuperFish 1.4.1.js
- Set scope to header -> no change
- Uncheck cache simplemenu variable -> SimpleMenu appears!
- Looked for simplemenu.js in files directory. It's not there.
- Checked Firefox console for errors. Saw nothing from SimpleMenu.
I am using the private file system. Does SimpleMenu 1.8 support it?
Comment #12
AlexisWilke commentedHi kassissieh,
The simplemenu-*.js should be under files/js, not files. And your web server should have permission to (1) create the js folder and then (2) create the simplemenu-*.js file(s).
I thought I checked and if that failed it would revert to the old behavior automatically. I guess I need to test that better!
Thank you.
Alexis
P.S. The * represents the md5 of the file contents.
Comment #13
echoz commented6.x-1.8 (like the last dev version) is still working fine in my tests, fixing my #6 bug report with insert.
Comment #14
kassissieh commentedHere's what is in my files/js directory.
-rw-r--r-- 1 www-data www-data 42540 2010-07-07 19:35 simplemenu-22aaf83f778721d22ae4c33661559c1c.js
-rw-r--r-- 1 www-data www-data 42480 2010-07-07 19:40 simplemenu-6da4ee23db23e576432e4731cc1d39f7.js
-rw-r--r-- 1 www-data www-data 42510 2010-07-07 19:39 simplemenu-85f9fe6bb473592a98ea5a06e07749b9.js
-rw-r--r-- 1 www-data www-data 42420 2010-07-07 19:39 simplemenu-ac296cad3235b07ec22053f3a28781e2.js
-rw-r--r-- 1 www-data www-data 42545 2010-07-07 19:35 simplemenu-f11fe6e37dd9cc8607b33bafacb37d9a.js
So it appears that SimpleMenu is creating JS files. What should I do next to troubleshoot?
Noob question: how do I subscribe by email to this thread? I only receive notifications when the issue is assigned to me.
Comment #15
AlexisWilke commentedkassissieh,
Okay! Good. So at least the files are being generated. I checked for the system cached CSS & JS and there is nothing about private anything. So I do not see why it would have any effect on Simplemenu either.
I suspect that somehow there is a syntax error in those .js files or somehow it is not loaded in the header.
Would you mind attaching one or two of them to this issue? It will include your menu (if you're worried about the contents.) This way I could see whether there is a JS error in there...
Otherwise, when you load a page that does not work with Simplemenu, see whether there is a <script type="text/javascript" src=".../simplemenu-....js"></script> entry in your page header. If you have JS compressed, then it is harder to see because there will be only one .js and the Simplemenu would be defined in that one file.
Speaking of that, it makes me think that I'm running with a Drupal core patch. Compressed JS may not work right with simplemenu without that patch. Hmmm...
Noob answer: If you go to the project page: http://drupal.org/project/simplemenu then you can subscribe to all the issues. I'm not too sure whether you can subscribe to just one specific issue by email... Otherwise, it appears in your Drupal account. But of course, that means you have to come to Drupal to have a look. 8-)
Thank you.
Alexis
Comment #16
kassissieh commentedLooks like SimpleMenu wrote the file path into the HTML header rather than the HTTP path. I've seen this happen before with modules working against the private file system.
script type="text/javascript" src="//home/web/[my site directory]/files/js/simplemenu-22aaf83f778721d22ae4c33661559c1c.js?e"
Comment #17
AlexisWilke commentedKassissieh,
I see. I re-read the info in the "File system" window. If you are to use the private file system, then the files are not visible to the outside because the system saves them in a location that is not (supposed to be) visible by Apache2. At times, I'm wondering about Drupal. This means all the cache feature offered in the Core are not accessible to you!!! I now understand how they test that part: they check the 'file_downloads' variable and see if it is PUBLIC. If not, they assume that Drupal cannot use that folder and thus no file caching available...
So I will fix simplemenu that way too. It sucks though. 8-P There will be a new 6.x-1.x-dev out soon with this fix.
Thank you.
Alexis Wilke
Comment #18
kassissieh commentedIt's not quite that bad. You just need to rewrite the URL as /system/files/... if the site uses the private file system, add an entry to the files table, and add a hook to SimpleMenu for Drupal to allow the user to access the file. FCKeditor does this well for managing inline file uploads and downloads.
http://api.drupal.org/api/function/hook_file_download/6
Comment #19
AlexisWilke commentedkassisieh,
> It's not that bad.
Okay, I'll wait for someone to post a patch then.
The cache is an extension from previous versions so not having it is just reverting back to 1.0/1.1.
Thank you.
Alexis
Comment #20
AlexisWilke commentedI'll mark this as fixed for now. If someone wants the optimization for a private file folder, he/she can create a new issue.
Thank you.
Alexis