• Resolved garrycrowfoot

    (@garrycrowfoot)


    For the last week I have been having problems updating my WordPress posts. Each time I use “Edit” in WP, I get a JSON error (“Updating failed. The response is not a valid JSON response.”). However, there is no problem updating if I use the “Quick Edit” option (but the update options there are very limited).

    I tried the following but nothing worked

    • De-activating all plugins (Elementor, Yoast, MonsterInsights)
    • De-activating the theme (Ocean WP)
    • Regenerating permalinks
    • Re-installing WordPress 6.3.1

    Any help would be greatly appreciated!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator t-p

    (@t-p)

    It may be a lot of different things (I see you have already attempted some troubleshooting):
    – a plugin conflict either 1) a plugin doing something that creates output, thus breaking the response or 2) a plugin doing something with caching,
    – an overloaded server,
    – misconfigured http/https address in General Settings,
    – blocking rules on your server
    – permalinks may need resetting,
    – theme/plugin conflict,
    – check Site Health: From your WordPress dashboard, if you go to Tools and then select Site Health, then under the Status tab on that page, WordPress will show you any improvement recommendations that could help your website. An issue related to Rest API could also cause the JSON response error on your website. Moreover, if you find any issue there, solving the issue might also fix the JSON response error for your website, etc.
    – Also review
    https://www.wpbeginner.com/wp-tutorials/how-to-fix-the-invalid-json-error-in-wordpress-beginners-guide/
    https://ww.wp.xz.cn/support/topic/json-blocks-posts-with-optional-permalinks/?view=all

    Thread Starter garrycrowfoot

    (@garrycrowfoot)

    Hi – thanks for your help.

    I have listed my responses to your advice in italics. Unfortunately, the problem continues. I can update existing page content in Elementor, but I cannot create/edit pages in the WordPress dashboard. I have passed on a maximum of information to HostPapa and I’m waiting for their reply.

    Best regards,
    Garry

    – a plugin conflict either
    1) a plugin doing something that creates output, thus breaking the response (*** I deactivated all plugins, but that didn’t make a difference)
    2) a plugin doing something with caching (*** the WP Site Health scan revealed a critical error (No Page Caching) and two recommended improvements (“imagick module not installed” & “no object caching”)
    – an overloaded server
    – misconfigured http/https address in General Settings (*** checked; this is OK)
    – blocking rules on your server (*** the hosting company, HostPapa told me that there were some permissions issues and that these had been corrected)
    – permalinks may need resetting (*** OK, checked, no problem here)
    – theme/plugin conflict (*** deactivating plugins & theme make no difference)
    – check Site Health: From your WordPress dashboard, if you go to Tools and then select Site Health, then under the Status tab on that page, WordPress will show you any improvement recommendations that could help your website. (*** OK, see above. I have informed the hosting company)

    An issue related to Rest API could also cause the JSON response error on your website. Moreover, if you find any issue there, solving the issue might also fix the JSON response error for your website, etc. (*** I need to read up on this!)

    Thread Starter garrycrowfoot

    (@garrycrowfoot)

    I just received a message from the web hosting company. They regenerated the permalinks and this solved the JSON problem. I had already tried this in the WP Dashboard, but I guess HostPapa has more powerful means at their disposal.

    In passing, I discovered that I should also be using W3 Total Cache plugin to accelerate my site (recommended by HostPapa).

    Garry

    • This reply was modified 2 years, 8 months ago by garrycrowfoot.
    Thread Starter garrycrowfoot

    (@garrycrowfoot)

    Unfortunately, the support person generated NEW (WP default version) permalinks, which meant that all external links (Facebook, Instagram…) to my web pages no longer worked and gave 404 errors.

    I regenerated the old permalink format (date + post name) and asked them to check again.

    This time they found a problem with “ModSecurity” which was blocking the update request as it triggered a rule. The person removed the rule and everything went back to normal.

    I hope that this helps other people: apparently JSON errors are frequent in WP sites and can be caused by many, many things.

    Moderator t-p

    (@t-p)

    Glad its sorted 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Updating posts: JSON error’ is closed to new replies.