WordPress

How to fix JSON API bug in WordPress?

If you’re finding JSON API requests back to your WordPress website fail Microsoft Internet Explorer, and you’ve got WP Super Cache installed, check you do not have Debugging enabled in the WP Super Cache Settings.

With Debugging enabled, WP Super Cache adds an extra HTML comment at the end of every page like this;

Page not cached by WP Super Cache. No closing HTML tag. Check your theme

Where this causes problems is the HTML comment is also added to the pages generated by the JSON API plugin, breaking the JSON file.

From what we can see, the addition of this debugging comment stops Internet Explorer IE11 (and possibly earlier Edge and older versions of IE) from being able to read the JSON data.

To fix,

  1. Log in to your WordPress Dashboard.
  2. Navigate to WP Super Cache (Settings > WP Super Cache.)
  3. Click the **Debug** tab.
  4. Uncheck *Debugging*
  5. Click **Save**

Was this guide helpful?

Need help with this?

Open a ticket and link to this guide so our team can see what you have tried.

View support tickets

Power your business with Ecenica Hosting

Built for WordPress and serious websites. Fast, secure and supported by real people in the UK.

Ecenica hosting services represented by a connected red route across London