Error: The response is not a valid JSON response - X.10.3.9

Dear Support,

I was trying to edit a page with cornerstone however no preview was shown with the error message: Document error: The response is not a valid JSON response.

I have tried several recommended solutions such as: plugin conflict (deactivation), downgrade theme, re-install cornerstone, renew htaccess, permalinks, so on. with no success.

Could you help me with this problem?

Thanks,
A

Hi Andita,

Thanks for reaching out.
If you have already performed the mentioned troubleshooting, I would suggest you please copy your live site to a staging server so we could investigate freely without breaking your live site.
And give us access to the secure note including:

– WordPress Site URL & Login URL
– WordPress Admin username/password

To create a secure note, click the key icon underneath any of your posts.

Thanks

Dear Tristup,

Thank you for your feedback. I have created the staging site and the credentials is located in the secure note below.

Looking forward to your feedback.
Best,
A

Hello Andita,

Please go to Tools > Site Health > Status. You need to resolve any performance issues first. And then in Tools > Site Health > Info > Server, you will see your server details. You will have to increase your Upload max filesize and the PHP post max size to at least 32M or 64M.

Best Regards.

Hi Ruenel,

I have applied your suggestions, at least for the critical ones. I still have two recommendations such as: Rest API and Caching, which we are working at the moment but they’re not categorized as critical.

The site health is now ‘Good’, but they are still not showing. Any other suggestions?

Best regards,
A

Hi Andita,

It seems that there might be a problem with the server configuration or any authentication at your server end which blocks the Cornerstone endpoints only. I would suggest you check if the mod_security is enabled on your site, and that causes the issue in calling the Cornerstone endpoints. If that is enabled, please disable it and check if that resolves your issue or not. I would suggest you go through the following article which may help you with this.


https://www.interserver.net/tips/kb/how-to-disable-mod_security-and-why-it-is-not-recommended/

Hope it helps.
Thanks

@tristup We are experiencing the same error - “Document Error: The response is not a valid JSON response” with our sites hosted by WP Engine. This error occurs with both https://wcc.yccd.edu/ & https://yc.yccd.edu. Are you suggesting his is due to a server configuration change by WP Engine?

Also @tristup - we were unable to upload the latest version of PRO – we get this error: “An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.”

@tristup Does Cornerstone Editor require access to an API endpoint?

It needs access to /wp-json. The route is usually /wp-json/themeco/data/document/ID when you are grabbing a page. That should return JSON.

Hi,

I disabled the mod_security via .htaccess still not working. But then I updated the WordPress version to 6.4 and now it is. So it is either succeed after updating the version, or the disabling takes time. Just wanted to share the result on this topic.

Thanks a lot!
Best regards,
A

1 Like

Hi Andita,

Glad that it is working now and that you shared the result with others.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.