When editing/creating a node in an administrative overlay, if the node has a file field, the field widget controls triggers this JS error:
Uncaught ReferenceError: simplemenu is not defined
To reproduce, just add a file field to a content type, create a new node (making sure the editing form is in an administrative overlay) and try to upload/delete files. Editing an existing node and trying to remove an uploaded file always triggers the error.
I'm using Google Chrome 15.0.x
Comments
Comment #1
crobinson commentedI will attempt to reproduce this issue.
Comment #2
jglynn commentedI get this too, in firefox, chrome, ie.
It also screws up the thumbnail creation when you try to upload the file.
Comment #3
manu manuHad the same issue (simplemenu is not defined) when trying to change a file display formater (this breaks processing after ajax calls).
Comment #4
AlexisWilke commentedNote that if any JS breaks before reaching the SimpleMenu JS (i.e. when put in the footer) then SimpleMenu dies but that is a side effect of the other breakage.
Thank you.
Alexis Wilke
Comment #5
manu manuSeems to be related to #1377154: AJAX calls fails due to javascript error: "simplemenu is not defined"
Comment #6
crobinson commentedI have made a change to the initialization script that checks whether simplemenu is defined before trying to access it. I didn't want to _only_ address the overlay case because I found some other instances that might trigger this. Please check the latest -dev branch and see if this resolve the problem, and if so, please respond here.
If it does not, please supply a line number from Firebug or similar where the error is occurring.
Comment #7
manu manuTesting the lastest dev, it seems working well..
No issue in node/edit and file display formater.
Comment #8
crobinson commentedThanks, moving to closure. We're trying to get to a production release here, starting to look good!
Comment #10
amanire commentedI'm still experiencing this issue, when removing an image file. The ReferenceError: simplemenu is not defined occurs at this line (28) on the page:
@import url("http://[example.com]/misc/ui/jquery.ui.resizable.css?m9isv4");
I just updated to the current dev version, which appears to be 2012-03-27.
Comment #10.0
amanire commentedadded browser info
Comment #11
crobinson commentedThis doesn't look like a module bug, it looks like a configuration error in your site. @import is a CSS include mechanism, it should not be running PHP code on your server. "[example.com]/anything" is not a valid URL for an import - somewhere you have a configuration setting with [example.com] in it that should be replaced with the real hostname for your site.
Comment #12
amanire commentedSorry for any confusion, I replaced the real domain name with [example.com] since the site is still in development.
Update: Not sure if the is relevant but I'm using a Zen 5 subtheme.
Comment #13
amanire commentedHere's a bit more context if it helps. Again, I've replaced the real domain name with [example.com] and prepended the line numbers of the page source code.
Firebug reports the error message at line 28.
Comment #14
amanire commentedComment #15
crobinson commentedThis still isn't a relevant bug for SimpleMenu. The line you've quoted above is part of the core jQuery UI library, and should be posted over on that section. But even if you set that aside a domain name isn't a legitimate start of a URL. It should be http://example.com/whatever.
The problem with Javascript is that any error anywhere can break every script on the page. When SimpleMenu tries to load, its support class needs to exist, and Javascript errors elsewhere can cause that to fail. Verify that you have no errors under Reports->Status Report - things like filesystem permission errors can prevent SimpleMenu (and other modules) from creating their temporary files.
There's no way a CSS include block as you've quoted about can be the source of a Javascript error - there's no Javascript code executing in the block you've quoted. I cannot reproduce this problem and nobody else seems to be experiencing it. Do you have any other information that can be used to reliably reproduce it? Is your site available on a public URL that could be examined remotely? Without something more to go on I may have to Cannot Reproduce this ticket again.
Comment #16
AlexisWilke commentedFixing the status.