• Resolved montebianco

    (@montebianco)


    The plugin worked great for awhile , now when trying batch push and individual product syncing There is a popup JSON error message saying Syntax error.
    Also, the automatic sync is not working in the background when stock changed on main site. Orders on the secondary site are updating stock on the main site.
    Console does not provide any extra info for the error.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author WP Trio

    (@wooelements)

    Hi,

    Syntax error occurs when the other website responds in a non-standard way that cannot be handled correctly. There are a few common reasons why it happens:

    • URL is invalid / doesn’t respond – try to visit with your browser and ensure it displays the URL correctly
    • Some security / firewall plugin causes the error, such as Defender – disable security plugins temporarily and test again
    • Another plugin is causing a conflict which results in an error – check PHP and WordPress error / debug logs
    • SSL certificate is invalid – try with valid SSL certificate or disable SSL temporarily
    • HTTP basic authentication is enabled which prevents connection – disable any HTTP basic auth
    • Multilingual plugin such as WPML or Polylang is redirecting from base path (https://example.com) to language path (https://example.com/en) – try to add language code (e.g. /en) to the URL

    When you run the credential check in the settings (WooCommerce > Settings > Stock Sync > Check credentials) and syntax error occurs, the plugin will log the URL, response code and body which sometimes can give hint about the issue. You can view the log in WooCommerce > Status > Logs > woo-stock-sync-exception-x-x-x-xxxxx.log. The log is different from the basic log (WooCommerce > Stock Sync > Log). In this example the reason is 404 error which means that the page couldn’t be found.

    If you run the credential check and send contents of the exception log, I can check what could be the issue. Thank you!

    Thread Starter montebianco

    (@montebianco)

    Hi,
    Thanks for the pointers.
    The problem we found was that a new security plugin locked out the hosting server’s IP address “Reason: Multiple erroneous requests” and “Probing for vulnerable code”. The server IP was whitelisted and it is working again.

    Plugin Author WP Trio

    (@wooelements)

    Glad to hear you found the culprit and thanks for reporting back!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘JSON Error: Syntax error’ is closed to new replies.