Hi, I’m getting a recurring JavaScript error on multiple pages of my site using the Soledad theme: Uncaught ReferenceError: ajax_var is not defined
It originates from main-scripts.min.js, which appears to be expecting the ajax_var object — but that variable isn’t being defined anywhere in the page source.
I’m using the latest version of Soledad and WordPress.
The error appears even when JavaScript deferral is turned off.
I’ve checked several pages (home, blog posts, category archives), and ajax_var is missing from the output entirely.
I’m not currently using any custom plugins that interfere with AJAX or script localization.
The error doesn’t break visible functionality yet, but it throws exceptions in the browser console and could impact performance or future features relying on AJAX.
This issue is related to the SiteGround Optimizer plugin.
Please make sure you've cleared all the optimized JS cache files, as the current files are still serving content from an older version, which is causing the browser to display this error.
Hi, I’m getting a recurring JavaScript error on multiple pages of my site using the Soledad theme:
Uncaught ReferenceError: ajax_var is not defined
It originates from main-scripts.min.js, which appears to be expecting the ajax_var object — but that variable isn’t being defined anywhere in the page source.
Thanks in advance
Walter
Hi,
This issue is related to the SiteGround Optimizer plugin.
Please make sure you've cleared all the optimized JS cache files, as the current files are still serving content from an older version, which is causing the browser to display this error.
Regards,
PenciDesign.
Thank you!. Resolved