Archived topic
“Updating failed. The response is not a valid JSON response.”
5 replies · Started by Matt on March 15, 2023
I've just pushed a staging version of my site live where I switched from Divi to Generatepress theme. No other plugins changed, and I'm getting the error message here. Any idea why?
Hi there,
(generally) WP throws that error if it cannot communicate with the REST API, which can simply be a permalink issue.
First thing to try is regenerating permalinks, by going to Settings > Permalinks and Click Save Changes.
If the issue persists, go to the Tools > Site Health and check if there are any issues related to the REST API being reported.
Hi - nothing showing related to Rest API... I tried the permalinks too.
What is on the page ?
As the other issue can arise if there are shortcodes on the page that the editor "doesn't like"
It happened when trying to embed a cookie policy into an html block. Other than that it was an empty page, as per this demo.
Yeah it probably doesn't like the script in there.
You can create a shortcode using the PPH Snippet here:
https://docs.generatepress.com/article/creating-a-shortcode/
Add your code in place of short code example
And rename the my_shortcode to something useful eg. cookie then you can add [cookie] shortcode in the editor.