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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

adammalone’s picture

Status: Active » Reviewed & tested by the community

Works for me - a site with admin and jquery update do not function as expected when js aggregation is turned on.

tnanek’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
1.63 KB

I 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.

rlnorthcutt’s picture

The 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

mdupont’s picture

This 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/

suit4’s picture

Patch seems to work fine. Thanks

skwashd’s picture

Assigned: Unassigned » skwashd
Status: Needs review » Reviewed & tested by the community

I 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.

DeactivatedGhostAccountLetPeopleDeletePosts’s picture

.

wesleydv’s picture

#7 seems to work, tested on jquery 1.5, 1.7 and 1.8

kenorb’s picture

Tested and the patch fixes the problem. Any change for the commit?

Fixes the error:

Error: Syntax error, unrecognized expression: [href=/home-page]

Where /home-page is the automatically generated URL Alias of the page.

jimmyko’s picture

This issue is fixed for months... no one commit it?

aken.niels@gmail.com’s picture

Patch works fine for me!

jramby’s picture

Status: Reviewed & tested by the community » Fixed

Any commit on this ?

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

oenie’s picture

Status: Closed (fixed) » Reviewed & tested by the community

jramby, 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 ...

DarrellDuane’s picture

Please commit the #7 patch. It fixed a bug I've been having for a long time that was very hard to track down.

dshields’s picture

I've resolved to simply uninstall this module.

jacob.embree’s picture

Version: 7.x-2.0-beta3 » 7.x-2.x-dev
Status: Reviewed & tested by the community » Needs review
FileSize
1.14 KB

The 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.