Skip Navigation

[Resolved] Updating failed. The response is not a valid JSON response.

This support ticket is created 3 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 4 replies, has 2 voices.

Last updated by christianS-13 3 years, 2 months ago.

Assisted by: Waqar.

Author
Posts
#2157419

I am trying to: Add/edit a post which is based on a Toolset CPT

Link to a page where the issue can be seen: You'd need to be in the WP admin

I expected to see: A successful save/publish

Instead, I got: Any change I make to a new post of type Research (a CPT I previously created using Toolset) throws a 403 "Updating failed. The response is not a valid JSON response." error when saved or published.

I don't get the same problem with standard posts, only these CPT posts. If I disable the Toolset Views plugin, the issue goes away.

My site uses Toolset Views and Types, which are both on the latest version.

Many thanks,
Chris

#2157891

Hi Chris,

Thank you for contacting us and I'd be happy to assist.

An error like this can be caused by a conflict with some code from a third-party plugin or theme.

To troubleshoot this, I'll suggest the following steps:

1. Please make sure that WordPress, active theme, and all (and not just Toolset) plugins are updated to the latest versions.

2. It would be interesting to test this with all non-Toolset plugins disabled and a default theme like Twenty Twenty-One.

If it's fixed, you can start adding the disabled items, one by one, to narrow down to a possible conflicting one.

3. In case the issue still persists, I'll need to see how this CPT is set up in the admin area and you're welcome to share temporary admin login details.

Note: Your next reply will be private and please make a complete backup copy, before sharing the access details.

regards,
Waqar

#2159331

Hi Waqar,

I've delved into this issue further and have found the culprit to be Cloudflare's firewall. It's blocking /wp-json/wp/v2 post requests. I've put in a firewall rule to allow this through and sure enough, that works. But I'm not sure how secure that is to just bypass the firewall? Have you encountered this before?

As I mentioned, this only happens for a Toolset CPT and not standard WP posts or pages.

Many thanks,
Chris

#2159857

Thanks for the update and glad that you were able to narrow it down.

The WordPress REST API requests like the one you mentioned are needed for the proper working of the new Gutenberg/blocks editor.

When using Cloudflare with WordPress it is generally a good idea to exclude its features from the admin area pages:
hidden link

It makes sense to enable optimizations and security features for the visitors on the front-end and not for the administrators working in the admin area.

#2161747

My issue is resolved now. Thank you!