• Resolved bjrnet21

    (@bjrnet21)


    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/b.png

    Did I find a BUG?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Plamen M

    (@plamenm)

    Hello @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

    Best regards,
    Plamen.M
    Tech Support Team
    SiteGround.com

    Thread Starter bjrnet21

    (@bjrnet21)

    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

    (@kuzmanstoyanov)

    Hello @bjrnet21,?

    I kindly suggest following the instructions provided in this thread 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

    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.