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
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?
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