• All the posts I tried to update get this error and the contact is NOT updated: Updating failed. The response is not a valid JSON response.

    Out of five pages, one can be updated normally, while the others cannot.

    Creating a new page lets me save it only if there is nothing but a title. If I add any type of block (paragraph, image, file…) I get the same error.

    What I have tried so far, without success:

    • Updated WordPress and site address
    • Switched permalink settings several times
    • Generated a new .htaccess file
    • Switched to default theme
    • Disabled all plugins
    • Purged caches

    Known issue: The site is currently running with PHP (7.2.34), while the recommended is 7.4, I am currently communicating with the hosting provider to have it updated.

    My main question is, what are the chances this is caused by the deprecated PHP version and it gets fixed when it gets updated? If so, I will just wait and try to put some more pressure on the provider. But I’d like to get it fixed if something else is causing it. Any help and suggestions are appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The cause of the message can also be a server-side error. This should be visible in the error log in the hosting. Or you activate the debug mode in WordPress as described here: https://www.ads-software.com/support/article/debugging-in-wordpress/ – and then look into the debug.log generated there

    I would recommend to switch directly to PHP 8.0. If you switch to 7.4 now, you would have to switch to 8.0 by the end of the year. Might as well do it now. Make sure that all plugins are up to date. If you have any very old plugin (which has not received any updates in the last 2 years) then you should see if you can find a replacement for it.

    Thread Starter intrelis

    (@intrelis)

    @threadi

    You were right, the host told me it was caused by an incorrectly triggered ModSecurity rule. Although it is still happening after they said they fixed it, so it’s still up in the air.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Invalid JSON Error when updating (most) pages & posts’ is closed to new replies.