Skip to content
Public Ticket #31329

avaScript Error: ajax_var is not defined – Soledad Theme Script Issue

Conversation thread

walter replied

Customer Reply

Thank you!. Resolved

PenciDesign Supporter replied

Staff Reply

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.

walter started the conversation

Conversation Start

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.


Thanks in advance

Walter

Want to join this conversation or access attachments? Sign in first.