Fixing Error decoding JSON data in Joomla Articles

This error is possible only with Google Structured Data v2. The issue is non-existant in v3.

Joomla uses the JSON format to store data regarding its articles. Since before Joomla v3.6.3 if the JSON was for whatever reason invalid. Joomla would silently fail and the site would continue working.

The Issue

After Joomla v3.6.3, some extra checks have been put in place to ensure that this JSON is in fact correctly formatted and stored in the database. In the occasion that it isn't then Joomla displays an error page with the message "Error decoding JSON data: Syntax error".

Google Structured Data Markup uses the article's JSON to store its Structured Data and more specifically it uses the "attribs column". There can be occassions where the data that ends up in the database are greater in size than what can be stored. This results in an invalid JSON and the error above.

How to Fix it

To fix this issue you can download a plugin from J2Store and troubleshoot exactly which article has end up with an invalid JSON Format.

With this plugin you will be able to reset the articles data and end up with a valid JSON. Once you do that you will be able to revisit your article and re-set its Structured Data in a more compact manner so that it doesn't end up in a greater size than what it can be stored.

Our suggestion upon revisiting your article which can cause the problem is that the fields which usually contain large amounts of information such as a Recipe's Instructions or an Article's Description should be re-edited into smaller versions.

Note

This error does not occur on articles created by the K2 Article Manager.

Last updated on Nov 26th 2024 12:11