Title: Uncaught SyntaxError: missing }
Last modified: January 14, 2024

---

# Uncaught SyntaxError: missing }

 *  Resolved [bjrnet21](https://wordpress.org/support/users/bjrnet21/)
 * (@bjrnet21)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/uncaught-syntaxerror-missing/)
 * I just upgraded to Yoast Premium and discovered it won’t work with the Frontend
   Javascript “Combine JavaScript Files” setting ON in Speed Optimizer. When I turn
   it OFF, Yoast behaves normally. Behavior was images were not loading with the
   setting ON.
 * Doing some debugging, I found a “missing }” error in a siteground-combined-js
   file. See photos below.
 * [https://static.bjrnet.com/test/a.png](https://static.bjrnet.com/test/a.png)
   
   [https://static.bjrnet.com/test/b.png](https://static.bjrnet.com/test/b.png)
 * Did I find a BUG?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Funcaught-syntaxerror-missing%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Support [Plamen M](https://wordpress.org/support/users/plamenm/)
 * (@plamenm)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/uncaught-syntaxerror-missing/#post-17342900)
 * Hello @[bjrnet21](https://wordpress.org/support/users/bjrnet21/),
 * The JavaScript combination process is an automated combining of several JavaScript
   files into a single file, to reduce the total DOM elements when loading a page,
   as well as reduce the deferring of rendered javascript elements. Because this
   is an automated process, it relies on the strict standards of writing JavaScript
   code. If any JavaScript code in your Themes or plugins is written without following
   the strict code standards, then the automated process may not combine this code
   properly and result in syntax errors. Since you have an issue with a Premium 
   plugin, we do not have a way to test it. The current case, is most probably not
   directly related to Yoast. The combination process is most probably breaking 
   into a syntax error due to the merging of all of the front end JavaScript elements
   of your Theme, your other plugins, plus Yoast, but you see the final result affecting
   a functionality in Yoast in particular.
 * In the current case, you or your site developers should check to see in which
   part of the combined JavaScript file the syntax error occurs. Then find which.
   js file in your site contains this part of the code and exclude this problematic.
   js file from the combination process. You can read how to exclude .js file here:
 * [https://eu.siteground.com/tutorials/wordpress/speed-optimizer/frontend-optimization/#Combine_CSS_and_JS_files](https://eu.siteground.com/tutorials/wordpress/speed-optimizer/frontend-optimization/#Combine_CSS_and_JS_files)
 * Best regards, 
   Plamen.MTech Support TeamSiteGround.com
 *  Thread Starter [bjrnet21](https://wordpress.org/support/users/bjrnet21/)
 * (@bjrnet21)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/uncaught-syntaxerror-missing/#post-17345529)
 * Under “Exclude from JavaScript Combination” there are only 24 scripts listed.
   I can’t add (exclude) the one JS file that I think has an error — which is yoast-
   seo-analysis-package.min.js located in the /wp-content/uploads directory.
 * Are only 24 scripts listed being combined / minimized?
 *  Plugin Support [kuzmanstoyanov](https://wordpress.org/support/users/kuzmanstoyanov/)
 * (@kuzmanstoyanov)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/uncaught-syntaxerror-missing/#post-17345727)
 * Hello [@bjrnet21](https://wordpress.org/support/users/bjrnet21/), 
 * I kindly suggest following the instructions [provided in this thread](https://wordpress.org/support/topic/how-to-use-sg-optimizers-filters-procedure/)
   to exclude scripts from being combined, especially if they’re not available in
   the exclusion menu in the WordPress backend.
 * Depending on how the JS script is incorporated on the page, there are various
   exclusion filters you can utilize:
 * [https://www.siteground.com/tutorials/wordpress/speed-optimizer/custom-filters](https://www.siteground.com/tutorials/wordpress/speed-optimizer/custom-filters)
 * If you require further assistance with this, I recommend submitting a ticket 
   from your SiteGround account. Our Technical Support team will review the case
   and apply the appropriate filter to exclude the problematic script from being
   combined. 
 * Best Regards,
   Kuzman Stoyanov

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

The topic ‘Uncaught SyntaxError: missing }’ is closed to new replies.

 * ![](https://ps.w.org/sg-cachepress/assets/icon-256x256.gif?rev=2971889)
 * [Speed Optimizer - The All-In-One Performance-Boosting Plugin](https://wordpress.org/plugins/sg-cachepress/)
 * [Support Threads](https://wordpress.org/support/plugin/sg-cachepress/)
 * [Active Topics](https://wordpress.org/support/plugin/sg-cachepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sg-cachepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sg-cachepress/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [kuzmanstoyanov](https://wordpress.org/support/users/kuzmanstoyanov/)
 * Last activity: [2 years, 4 months ago](https://wordpress.org/support/topic/uncaught-syntaxerror-missing/#post-17345727)
 * Status: resolved