Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
In my console I'm getting consistent errors being output when I try to use the hs_menu module. Every time I select a menu I get the error:
jquery.min.js:16Uncaught Syntax error, unrecognized expression: [value=main-menu:0]
OR
jquery.min.js:16Uncaught Syntax error, unrecognized expression: [value=menu-secondary-links:0]
I'm using the Google CDN of jQuery and jQuery UI. This is completely breaking the hierarchical select of the menu for me. Has anyone else had this issue?
Comment | File | Size | Author |
---|---|---|---|
#8 | 1315192-fix-syntax-error-8.patch | 758 bytes | sylus |
#5 | 1315192-fix-syntax-error-1.patch | 1.08 KB | acbramley |
Comments
Comment #1
acbramley CreditAttribution: acbramley commentedProbably worth noting I am using hs_taxonomy and it works fine.
Comment #2
wiifmHaving the same issue,
on removing the jquery_update module, and bring jQuery back to stock 1.4.4 hs_menu started working again.
Perhaps this is an issue with the selector being used?
Anyone care to comment
Comment #3
acbramley CreditAttribution: acbramley commentedSwitching issue queues as this is caused by jquery_update.
Comment #4
acbramley CreditAttribution: acbramley commentedThe only line in hierarchical_select.js that I can find that is using this [value=''] is line 475:
Comment #5
acbramley CreditAttribution: acbramley commentedThis patch fixes the error and works both with jquery_update module turned off and turned on.
Comment #6
coreyp_1 CreditAttribution: coreyp_1 commented#5 fixed our issue. We were using the hierarchical select in a custom form element, and it would die after the second level due to the
value
variable. The patch wraps the value with a double quote, which should always be done, anyway, so I believe that this is the correct fix.Seeing as this has languished for about a year, I'm marking it as rtbc.
Comment #7
cravecode CreditAttribution: cravecode commentedI was going to commit the same fix. Works for me on jQuery 1.8.3. Curious as to why this hasn't been merged.
Comment #8
sylus CreditAttribution: sylus commentedAttaching patch for latest dev:
Comment #9
milovan CreditAttribution: milovan commentedPatch @ #5 is also applicable on Hierarchical select for Drupal 6 and fixes exactly the same error.
Thanks for the patch!
Comment #10
acbramley CreditAttribution: acbramley commented@sylus my patch applied fine to the latest dev, no need to upload duplicates.
Comment #11
HansKuiters CreditAttribution: HansKuiters commentedPatch #8 works great for dev. Thanks.
Comment #12
acbramley CreditAttribution: acbramley commentedPlease can we commit this 2 year old issue! Please commit #5
Comment #13
Wim LeersThanks, committed!
http://drupalcode.org/project/hierarchical_select.git/commit/c295d82
Comment #15
Corwin CreditAttribution: Corwin commentedI'm having this issue when jQuery update is enabled however I am not using the hierarchical_select modules. I do have og_menu installed.
Uncaught Error: Syntax error, unrecognized expression: [value=menu-main-menu:0]
Comment #16
milovan CreditAttribution: milovan commentedHey, since patch is applicable on Drupal 6 as well and fixes the same issue there, can you also commit it for D6, please?
Comment #18
stefan.r CreditAttribution: stefan.r commentedCommitted to 6.x-3.x-dev, thanks