I run quite a number of WordPress blogs. For some reason, recently, whenever I try to edit one of the sidebar or footer widgets to alter an item in it, I get this error on Update –
There was an error. The response is not a valid JSON response.
What is a JSON response, and how do you fix it?
WordPress and JSON Response
Here, though, we’re dealing with a very specific situation that is happening with JSON. So you can ignore most of the gobblygook you’ll find on the web. Here we just need to know, when updating a widget in WordPress, what is most likely to cause this annoying error.
Widgets and Blocks
The problem really boils down to an incompatibility between a recent(ish) change in WordPress and existing plugins. WordPress decided to make their software ‘easier’ by moving over to a blocks mentality. All current WordPress operations involving widgets also involve blocks.
However, not all plugin authors have updated their plugins. Even if you have manually updated every single plugin on your site to be its latest release, it could be that one of those plugins just doesn’t work well with blocks. Plugin authors often work for free in their spare time. Maybe one of those authors hasn’t gotten around to updating their plugin yet.
Here’s how to test that theory.
Log into WordPress. Go to the Plugins area. Add in a new plugin – you’re looking for CLASSIC WIDGETS. This plugin is SPECIFICALLY about Widgets. Make sure you get the widget one. Activate that. That will help the widget area work even if they aren’t coded to the new block requirement.
Did that handle your JSON error? If so, now we know what the problem was.
You can either just leave the classic widgets running, or you can do the traditional deactivate-one-by-one technique to figure out which plugin was the one causing the problem. Once you figure out which specific plugin was choking your WordPress installation, you can contact them to ask them to fix the issue. Or you can stop using that plugin and use a different one which is up to date with the latest WordPress changes.
It’s also worth noting that sometimes it could be something IN one of your widgets. For one of my sites, I installed Classic Widgets. I then went through and deactivated each plugin one by one. I got the error all the time, even with the plugins deactivated. So it was something actually in one of those widgets which was choking the new code. At some point when I have time I’ll have to try removing the widget content one by one to figure out what the issue is.
Ask with any questions!