• Hi,

    So we’ve just updated to 4.5 and we seem to be receiving a syntax error with jQuery which has completely stripped the website of its navigation bar, among other things.

    I’ve read around that it’s likely caused by a plugin placing jQuery in the footer, but to my knowledge we’ve not got a plugin of that nature installed on the website. I’m a little lost with this and am hoping somebody might know what’s caused this problem.

    The error we’re receiving is:

    Uncaught Error: Syntax error, unrecognized expression: a[href*=#]:not([href=#])

    and the URL is https://www.claremontwealth.com

    If anyone could point me in the right direction I’d be grateful. Thanks!

Viewing 13 replies - 1 through 13 (of 13 total)
  • I’m getting the same error…

    I think it’s possibly because it’s updated the bundled jQuery version from 1.11.3 to 1.12.2

    Might be worth disabling the bundled version an using a standalone version with your theme

    Thread Starter pixelborder

    (@pixelborder)

    That worked perfectly, thank you!

    Do you think this is something that will likely get rectified as WordPress become aware of the issue?

    Moderator Marius L. J.

    (@clorith)

    Hi,

    This is not a WordPress problem, but a theme or plugin incorrectly using JavaScript code, the newer versions of jQuery are just better at detecting incorrect code and erroring out about it.

    It is highly recommended -not- to override the core jQuery version as plugins and themes rely on this to be a known value.

    Unfortunately it’s hard for us to pinpoint if it’s a theme or plugin causing the problem if you’ve already overwritten the jQuery versions.

    Perfect Buddy!! Thanks for the code.

    ??

    Thread Starter pixelborder

    (@pixelborder)

    Thank you Marius, I think I follow.

    So it’s more likely a result of a plugin or theme having been unprepared for the 4.5 update?

    I suspect it has a lot to do with our theme (Divi) needing an update. We’re waiting on authorisation to upgrade it. I’ll remove the above code when the theme is updated and hopefully that will fix the issue properly.

    Moderator Marius L. J.

    (@clorith)

    @pixelborder
    Divi is known to be incompatible, yes, our Master List (https://www.ads-software.com/support/topic/read-this-first-wordpress-45-master-list) contains a fix for this that does not break Core jQuery though.

    If you’re at all familiar with the command line, this ack command will pinpoint the malformed code:

    ack "\[href.?=#"

    Just run that at the root of your site via ssh and it’ll find the problems to correct.

    Thread Starter pixelborder

    (@pixelborder)

    That’s brilliant, thank you very much!

    I’ve stripped out the code above from the functions file and altered the offending line in the custom.js file and it works perfectly.

    Hi Guys,

    I am busy building a website on a temporary domain with a theme called Avada. I made some progress yesterday and today my site wont load at all. Not when I “preview site”, not when I “visit site” nor when I just follow my domain.

    Is this what you guys are experiencing too?

    Here is my domain: https://791.34e.myftpupload.com/

    Would love to get your insights. Thanks

    @therous: your issue is completely different and unrelated; start your own thread.

    But first, realize that Avada is a premium theme not supported in these forums. You need to go to the site where you bought the theme for help. These forums are for free themes available in the WordPress theme directory at https://www.ads-software.com/themes/. See https://codex.www.ads-software.com/Forum_Welcome#Commercial_Products

    Thanks Mark, I am new to wordpress and still finding my feet in the community. I did see something that looks closer like my issue on an Avada forum.

    Appreciate the reply

    Best

    Hi I am having a similar problem and not sure what to do. Can someone please help me? Both my simple tooltip plugin and accordion feature aren’t working. What should I do?

    @tgindustriesadmin: Read for the jQuery 1.12 fix: https://www.ads-software.com/support/topic/read-this-first-wordpress-45-master-list?replies=7

    And, you’re using a premium/paid theme. It’s best to go to the support site where you bought the theme for help with customizations and issues. You paid for support when you bought the theme, so you should contact the people who sold you the theme. These forums are for free themes available in the WordPress theme directory at https://www.ads-software.com/themes/. See https://codex.www.ads-software.com/Forum_Welcome#Commercial_Products

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘WP 4.5 and jQuery Syntax Error’ is closed to new replies.