Title: Uncaught Error: Syntax error, unrecognized expression: ul
Last modified: August 31, 2016

---

# Uncaught Error: Syntax error, unrecognized expression: ul

 *  Resolved [MeOnline](https://wordpress.org/support/users/webber2012/)
 * (@webber2012)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/uncaught-error-syntax-error-unrecognized-expression-ul/)
 * After upgrading WordPress to 4.5, suddenly GravityForms stopped working (forms
   didn’t show anymore in the frontend).
 * The following error was on the page:
    jquery.js?ver=1.12.3:2 Uncaught Error: 
   Syntax error, unrecognized expression: ul.art-hmenu a[href=#]
 * To fix this with a theme made via Artisteer, open wp-content/themes/yourtheme/
   script.js and do the following:
    —- The link location (hash marks, #, in this
   case) should be quoted: [href=”#”] and -not- without quotes around the # ([href
   =#]) — After changing that, don’t forget to purge browser cache!
 * It seems that this is some kind of bug – also happening with some commercial 
   themes it seems.

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/uncaught-error-syntax-error-unrecognized-expression-ul/#post-7347124)
 * The problem is detailed here: [https://wordpress.org/support/topic/read-this-first-wordpress-45-master-list?replies=7&view=all#post-8271654](https://wordpress.org/support/topic/read-this-first-wordpress-45-master-list?replies=7&view=all#post-8271654)
 * In short though, you’ll need to contact Artisteer about an update to your theme.
 *  [ottomek](https://wordpress.org/support/users/ottomek/)
 * (@ottomek)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/uncaught-error-syntax-error-unrecognized-expression-ul/#post-7347168)
 * Thanks to you both. This just happened to one of my sites too and with your instructions
   I could easily update old theme.
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/uncaught-error-syntax-error-unrecognized-expression-ul/#post-7347169)
 * You’re welcome!
 *  Thread Starter [MeOnline](https://wordpress.org/support/users/webber2012/)
 * (@webber2012)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/uncaught-error-syntax-error-unrecognized-expression-ul/#post-7347170)
 * Glad to hear you also managed to get the issue fixed ottomek.
 * Unfortunately Aristeer is a theme creator so not a specific theme provider and
   they have dropped support for Aristeer since they introduced Themler, the follow
   up of Artisteer. :-/
 * So this is basically a sort of Artisteer bug which apparently surfaces with the
   latest version of WordPress and in combination with certain plugins like GravityForms.
 * All themes created with Artisteer could possibly have this bug/issue I suspect.
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/uncaught-error-syntax-error-unrecognized-expression-ul/#post-7347171)
 * It’s possible, and unfortunately it’s up to them to fix.
 * The short version of [https://wordpress.org/support/topic/read-this-first-wordpress-45-master-list?replies=7&view=all#post-8271654](https://wordpress.org/support/topic/read-this-first-wordpress-45-master-list?replies=7&view=all#post-8271654)
   is that they (and a few other theme developers) were using jQuery incorrectly(
   against documented coding standards), and jQuery was eventually updated to close
   the exploit they were using. WordPress was updated to include the latest jQuery,
   and now the exploit they were using can no longer be exploited.
 * It’s not something that can be fixed in WordPress, as WordPress is simply using
   the latest jQuery, it’s not a bug. It’s up to the theme developers to fix this
   in their own themes, or perhaps it’s time to switch to a better theme that respects
   coding standards. There are many great free themes these days: [https://wordpress.org/themes/browse/popular/](https://wordpress.org/themes/browse/popular/)
 *  Thread Starter [MeOnline](https://wordpress.org/support/users/webber2012/)
 * (@webber2012)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/uncaught-error-syntax-error-unrecognized-expression-ul/#post-7347172)
 * Thanks for explaining.
    I also found that several commercial theme providers 
   had the same issue indeed.
 * In the Artisteer case, the file that needed to be modified is one that by default
   is supplied and created with -every- Artisteer generated theme as far as I am
   aware.
    In the meanwhile I also pointed this out to Artisteer so we’ll have to
   wait and see if they’ll pick this up – I do have my doubts though.
 * I forgot to mention where the specific code is in the file, so hereby a better
   version of the fix:
 * Open wp-content/themes/yourtheme/script.js
 * ————————————————–
    On or around line 22 find: jQuery(‘ul.art-hmenu a[href=#]’).
   click(function () { return false; });
 * Change this to:
    jQuery(‘ul.art-hmenu a[href=”#”]’).click(function () { return
   false; }); ————————————————– Note the quotes (“) that have been submitted before
   and after the hashtag sign (#) in the changed code.
 * When this code is not available (not sure if this is possible) or you cannot 
   find it, I would suggest to search for a[href=#] in the code of the files of 
   your theme and change that to a[href=”#”]
    I believe it should be in one of the.
   js files of the theme.
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/uncaught-error-syntax-error-unrecognized-expression-ul/#post-7347184)
 * Thanks for sharing your fix!

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Uncaught Error: Syntax error, unrecognized expression: ul’ is closed 
to new replies.

## Tags

 * [artisteer](https://wordpress.org/support/topic-tag/artisteer/)
 * [jquery](https://wordpress.org/support/topic-tag/jquery/)
 * [WordPress 4.5](https://wordpress.org/support/topic-tag/wordpress-4-5/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 3 participants
 * Last reply from: [James Huff](https://wordpress.org/support/users/macmanx/)
 * Last activity: [9 years, 11 months ago](https://wordpress.org/support/topic/uncaught-error-syntax-error-unrecognized-expression-ul/#post-7347184)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
