Hi community,
drupal jquery version : 1.8
chrome : 24.0.1312.57
After installing admin module, no javascript work anymore ! I get on every page the following js error :
Uncaught Error: Syntax error, unrecognized expression: ul.menu a[href=/admin/content]
After looking at the jquery documentation (http://api.jquery.com/category/selectors/attribute-selectors/) we should surround selectors which contain not valid (http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier) chars
Attribute values in selector expressions must follow the rules for W3C CSS selectors; in general, that means anything other than a valid identifier should be surrounded by quotation marks.
Lots of talk around escaping selectors on forums, it seems that for our needs here, simply quoting the string make jquery able to perform the job
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | admin-jquery_update-1968508-17.patch | 1.14 KB | jacob.embree |
| #7 | admin-jquery_update-1968508-4-FIXED.patch | 2.34 KB | DeactivatedGhostAccountLetPeopleDeletePosts |
Comments
Comment #1
adammaloneWorks for me - a site with admin and jquery update do not function as expected when js aggregation is turned on.
Comment #2
tnanek commentedI incorporated 7gipsy's changes above using the more general git instructions for modules. Not everyone puts this module as a sub-folder of contrib, so doing that adds another step for testing it, and integrating it. Marking as needs review since this is technically a new patch, though its really the same thing.
Comment #3
rlnorthcuttThe last patch works for me if I use jQuery 1.8, but not 1.7. I get:
"Uncaught TypeError: Cannot call method 'html' of undefined"
Line 90 of jquery.drilldown.js
Comment #4
mdupontThis one seems to work with jQuery 1.5, 1.7 and 1.8. With jQuery 1.6+, attr() may return 'undefined' and break chaining, hence the error you got. See http://api.jquery.com/attr/
Comment #5
suit4 commentedPatch seems to work fine. Thanks
Comment #6
skwashd commentedI have tested this and it works as expected. I will play with it for a day or 2 to ensure it doesn't have any unintended side effects, but I hope to commit this by the end of the week.
Comment #7
DeactivatedGhostAccountLetPeopleDeletePosts commented.
Comment #8
wesleydv commented#7 seems to work, tested on jquery 1.5, 1.7 and 1.8
Comment #9
kenorb commentedTested and the patch fixes the problem. Any change for the commit?
Fixes the error:
Where /home-page is the automatically generated URL Alias of the page.
Comment #10
jimmyko commentedThis issue is fixed for months... no one commit it?
Comment #11
nvakenPatch works fine for me!
Comment #12
jramby commentedAny commit on this ?
Comment #14
oenie commentedjramby, just changing it to 'fixed' is not going to get it commited IMHO.
That way it's just going to be lost in the void ...
Comment #15
darrellduane commentedPlease commit the #7 patch. It fixed a bug I've been having for a long time that was very hard to track down.
Comment #16
dshields commentedI've resolved to simply uninstall this module.
Comment #17
jacob.embree commentedThe changes in #0, #2, #4, are in the 7.x-2.x branch and in the patch in #7, so none of them applies. This one is rerolled against 7.x-2.x.
I don't actually expect that this module will get any more commits, but it's useful to have the patches on here for drush make files.
Comment #18
sickness29 commentedD7 reached its EOL back in January 2025, and there is no active release for D7 for this module anymore.
Development or support is not planned for D7. All D7-related issues are marked as outdated in a bunch.
Everyone can apply the patch above (not tested by the maintainers, tested by the community) to their D7 projects.
If the issue remains relevant for D10+ versions, merge requests with proposed solutions for a new module version (D10+) are welcome in a new follow-up issue.
Thanks!