Error decoding JSON data: Syntax error – One Possible Fix

All right, all right. We’re mighty late with a ‘fix’ for this problem. But that’s because we haven’t run into it either. Let’s get to it.

After upgrading Joomla to Joomla 3.6.3 you might see the following error when trying to edit an article (and possibly modules, …):

Error decoding JSON data: Syntax error

I am not going to pretend to speak developer all of a sudden, but this error means that something’s wrong with one of the ‘settings’ for your article / module. Somewhere in your database, a mistake was made.

One “popular” fix back in the days was to partially roll back to Joomla 3.6.2. That’s the wrong approach for two reasons:

  1. THAT VERSION WAS PATCHED FOR A REASON.
  2. You’re not fixing the problem. You’re just killing the messenger and burying the body.

Instead, you could look into the database itself. When I read from Michael Babker (I hope I wrote that right) that it could be as simple as a { too little in one of the ‘settings’ fields I went to research.

So, here’s what you can do to try and solve the problem.

  1. Note the ID of the article / module
  2. Open PHPMyAdmin / your MySQL workbench of your choice.
  3. Lookup the item in com_content, com_modules or com_whateveryourelooking for. Joomla is fairly good at naming databases after what they contain. (No offense, Magento. You suck.)
  4. Compare the column values to those of articles / modules that work just fine, and focus at the start / stop. Do you see any extra / missing symbols?

When I tried this on my article, I stumbled upon the following:

JoomlaMySQLJSON

Pay close attention to what’s going on in the attribs column. Something went wrong, and there’s an extra {“ that shouldn’t be there.

After removing these extra characters, the article opened again.

So, if you are confronted by a JSON error, check your data. And make a back-up first.

Fun Story Time: As it turns out, this wasn’t even the article the client needed to edit and it only said “test”. 

Discover more from PowerUser Guide

Subscribe now to keep reading and get access to the full archive.

Continue reading