After upgrades to some Joomla sites we run I tried to log into the backend of one of them and to my surprise couldn’t get in. Close inspection showed an error “Error decoding JSON data”.
After some trial and errors to see if any of the security software was acting up I did a thorough Google search and came across quite a few people in the same boat as me with many suggestions and no real solution.
Until I found https://github.com/joomla/joomla-cms/issues/12460 and read through it. Finally the real fix to the problem was posted by alexgarel.
You have to issue a SQL command to clear the offending entries from the database. Previous versions didn’t throw an error when receiving the data, but the new Joomla code isn’t as forgiving. So here it is:
update `xxxx_modules` set params="" WHERE params = "{\"\"}";
The xxxx has to be replaced with the table prefix for your Joomla installation.
If you are not familiar with issuing SQL commands, please contact your webdesigner, webhost or sysadmin to execute it for you.
If you are still having issues after this command or you don’t want to mess with SQL then please try the program at https://github.com/robwent/joomla-json-db-check – it does a more thorough check and fix on many more tables.
I didn’t need to use it, but it seems to be the most thorough solution out there at this point.
And always be safe – make a backup before any attempted fixes.