Error decoding JSON data: Syntax error after update to 3.6.3

Need help upgrading your Joomla! website or converting to Joomla! 3.x? Please consider the availability of third-party templates and extensions when deciding which Joomla version to use.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
CatfishPKR
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 111
Joined: Thu Oct 21, 2010 2:17 pm

Error decoding JSON data: Syntax error after update to 3.6.3

Postby CatfishPKR » Tue Oct 18, 2016 4:38 pm

I have updated a couple of sites, and one site is now showing Error decoding JSON data: Syntax error in the backend, frontend says: Error displaying the error page: Error decoding JSON data: Syntax error: Error decoding JSON data: Syntax error

cybersholt
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Tue Oct 18, 2016 6:46 pm

Re: Error decoding JSON data: Syntax error after update to 3.6.3

Postby cybersholt » Tue Oct 18, 2016 6:47 pm

getting the same thing myself, here's a stack trace.

Code: Select all

An error has occurred.
 0 Error decoding JSON data: Syntax error
Call stack
#   Function   Location
1   JApplicationCms->execute()   /var/www/html/administrator/index.php:51
2   JApplicationAdministrator->doExecute()   /var/www/html/libraries/cms/application/cms.php:261
3   JApplicationAdministrator->dispatch()   /var/www/html/libraries/cms/application/administrator.php:152
4   JComponentHelper::renderComponent()   /var/www/html/libraries/cms/application/administrator.php:98
5   JComponentHelper::executeComponent()   /var/www/html/libraries/cms/component/helper.php:380
6   require_once()   /var/www/html/libraries/cms/component/helper.php:405
7   JControllerLegacy->execute()   /var/www/html/administrator/components/com_login/login.php:22
8   LoginController->display()   /var/www/html/libraries/legacy/controller/legacy.php:702
9   JControllerLegacy->display()   /var/www/html/administrator/components/com_login/controller.php:45
10   JViewLegacy->display()   /var/www/html/libraries/legacy/controller/legacy.php:664
11   JViewLegacy->loadTemplate()   /var/www/html/libraries/legacy/view/legacy.php:216
12   include()   /var/www/html/libraries/legacy/view/legacy.php:677
13   JModuleHelper::renderModule()   /var/www/html/administrator/components/com_login/views/login/tmpl/default.php:20
14   Joomla\Registry\Registry->loadString()   /var/www/html/libraries/cms/module/helper.php:170
15   Joomla\Registry\Format\Json->stringToObject()   /var/www/html/libraries/vendor/joomla/registry/src/Registry.php:366


Figured before someone mentions using forum post assistant, currently have no admin access to this one's admin section but it's a clone of another running instance.


OS: Centos 7
PHP 7.0.9
MySQLi 5.7.14
Joomla: 3.6.3

cybersholt
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Tue Oct 18, 2016 6:46 pm

Re: Error decoding JSON data: Syntax error after update to 3.6.3

Postby cybersholt » Tue Oct 18, 2016 7:10 pm

@CatfishPKR if you need a quick fix to get back in, download the 3.6.2 full package, unzip and upload contents to server.

User avatar
mbabker
Joomla! Hero
Joomla! Hero
Posts: 2024
Joined: Sun Feb 28, 2010 8:26 pm
Location: White Bear Lake, MN, USA
Contact:

Re: Error decoding JSON data: Syntax error after update to 3.6.3

Postby mbabker » Tue Oct 18, 2016 7:15 pm

Your issue there is whatever column is trying to be processed by the Registry class has malformed JSON syntax. We found that to be an issue with some of the sample data and implemented a check in core in the place that directly affected. That path though isn't one that's affected.
Production Department Coordinator, Release Lead, CMS Maintainer, Framework Maintainer, Security Team Member, .org System Administrator

Manually updating Joomla? See https://gist.github.com/mbabker/d7bfb4e1e2fbc6b7815a733607f89281

gigatech
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sat Nov 12, 2011 10:15 pm

Re: Error decoding JSON data: Syntax error after update to 3.6.3

Postby gigatech » Tue Oct 18, 2016 8:00 pm

i have the exact same problem ,i only have this error in the backend using k2, for now is there a fix beside downgrading (3.6.3 contains security fixes so....) :'(

Aniceplace
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Tue Oct 18, 2016 8:14 pm

Re: Error decoding JSON data: Syntax error after update to 3.6.3

Postby Aniceplace » Tue Oct 18, 2016 8:19 pm

Have the same problem here, but in the front end of the main site, which is now dead.
I have access to the admin area.

User avatar
PhilTaylor-Prazgod
Joomla! Ace
Joomla! Ace
Posts: 1132
Joined: Sat Aug 20, 2005 12:32 pm
Location: Weymouth, UK
Contact:

Re: Error decoding JSON data: Syntax error after update to 3.6.3

Postby PhilTaylor-Prazgod » Tue Oct 18, 2016 8:23 pm

Phil Taylor - Full Time Joomla/PHP Security Expert
Blue Flame Digital Solutions Limited.
-- https://myjoomla.com/ Quadruple Award Winning Joomla Security & Auditing Service
-- https://www.phil-taylor.com/

pesu_swe
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Wed Apr 17, 2013 8:24 pm

Re: Error decoding JSON data: Syntax error after update to 3.6.3

Postby pesu_swe » Tue Oct 18, 2016 8:53 pm

I have a similar problem after upgrade from 3.6.2 to 3.6.3.
I can't edit any of my modules after upgrade. I also got a JSON error. My problem occurs only in backend. I have no problem in frontend.
I run all my sites with PHP 7.0.10.

infidean
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Thu Jan 31, 2008 8:14 pm

Re: Error decoding JSON data: Syntax error after update to 3.6.3

Postby infidean » Wed Oct 19, 2016 2:10 am

Same problem here

Disabling the JB Library plugin brought my site back up, but I don't think that is a fix.

high123456789
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Oct 19, 2016 6:25 am

Re: Error decoding JSON data: Syntax error after update to 3.6.3

Postby high123456789 » Wed Oct 19, 2016 6:28 am

same here from 3.6.2 to 3.6.3

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 23730
Joined: Mon Oct 27, 2008 9:27 pm
Location: Akershus, Norway

Re: Error decoding JSON data: Syntax error after update to 3.6.3

Postby Per Yngve Berg » Wed Oct 19, 2016 7:57 am

Upgrade php. There is a bug in 7.0.9

muskbh
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Wed Oct 20, 2010 11:36 am

Re: Error decoding JSON data: Syntax error after update to 3.6.3

Postby muskbh » Wed Oct 19, 2016 8:42 am

Hi
Can any of you explain in details how to fix this problem with backend error:

Error decoding JSON data: object property name separator ':' expected

I get a little confused reading the answers in this thread - and me being a novice need a what to do list to sort this out.
I would appreciate it a lot.

/Kasper

muskbh
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Wed Oct 20, 2010 11:36 am

Re: Error decoding JSON data: Syntax error after update to 3.6.3

Postby muskbh » Wed Oct 19, 2016 9:55 am

I solved it for now.
I copied the library folder from joomla 3.6.2, overwriting the one from 3.6.3
/kasper

rswebmaster
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Oct 19, 2016 12:46 pm

Re: Error decoding JSON data: Syntax error after update to 3.6.3

Postby rswebmaster » Wed Oct 19, 2016 2:09 pm

muskbh wrote:I solved it for now.
I copied the library folder from joomla 3.6.2, overwriting the one from 3.6.3
/kasper

have you done this with a copy of your backup ore the map library from a new joomla installation? i have try several library maps and no one is with succes. i'll hope someone will find quick a solution ore a fix. greatings from the netherlands

Marijke
Joomla! Apprentice
Joomla! Apprentice
Posts: 36
Joined: Thu Jan 18, 2007 1:36 pm
Location: Netherlands
Contact:

Re: Error decoding JSON data: Syntax error after update to 3.6.3

Postby Marijke » Wed Oct 19, 2016 2:12 pm

@rswebmaster I downloaded a clean 3.6.2. joomla package from: https://www.joomla.org/announcements/re ... eased.html
Then I took the library/vendor files and copied them over the broken 3.6.3. library/vendor files. This worked like a charm for me...
Need help with your Joomla site? Come find us at http://www.kovoks.nl!

tapiochre
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Wed Nov 03, 2010 11:32 am

Re: Error decoding JSON data: Syntax error after update to 3.6.3

Postby tapiochre » Wed Oct 19, 2016 3:01 pm

@rswebmaster

I also did as @marijke described and all was well. I renamed the /libraries/vendor folder to /libraries/_vendor before copying in the /libraries/vendor folder from the 3.6.2 Stable Fill Package found here:

https://github.com/joomla/joomla-cms/releases/tag/3.6.2

Hope this helps but I sure won't be upgrading to 3.6.3 anytime soon!

User avatar
mbabker
Joomla! Hero
Joomla! Hero
Posts: 2024
Joined: Sun Feb 28, 2010 8:26 pm
Location: White Bear Lake, MN, USA
Contact:

Re: Error decoding JSON data: Syntax error after update to 3.6.3

Postby mbabker » Wed Oct 19, 2016 3:08 pm

Please do not spread misinformation that the libraries/vendor directory contains broken code in 3.6.3. It doesn't.

The issue that is being run into is that an additional error check was added to the JSON formatter in the Registry API. So specifically what is the common issue here is that data sources which are supposed to contain valid JSON formatted data do not. This added error check looks to see if there was an error converting the string it was given (which is supposed to be valid JSON) into an object readable by the PHP code, and if there was an error with that process it throws an Exception indicating the error.

The common culprit I'm seeing for this is reading data from either the extensions or modules database tables. Both of them have `params` columns which have data stored in JSON format. To hit the line that tries to decode the JSON string to an object, the column has to have either a "{" as its first character or a "}" as its last character. If the column has a null or empty value, it won't reach this line.

Basically what this is indicating is there is improperly structured data being given into the API to decode and the API hits an error with it (correctly so). What changed between 3.6.2 and 3.6.3 is that the error was silently ignored.

Sorry for the highly technical explanation before this point, but there's really no other way to get around that.

As for the fact that things work if you restore the 3.6.2 version of this directory, what it was doing there was basically receiving a null or false return value versus the decoded data object. So ultimately the data that the code was looking for isn't actually getting loaded into memory. Now in a lot of places this really isn't an issue because the PHP code will use sensible default values when this data doesn't exist. It does become an issue if you've customized parameter values though and will cause your custom values to not be used.

Long and short, restoring the 3.6.2 code "works", but it's not addressing the underlying issue of invalid data being fed into the code to be processed. How that data got there, I can't say, I can just diagnose the symptoms.
Production Department Coordinator, Release Lead, CMS Maintainer, Framework Maintainer, Security Team Member, .org System Administrator

Manually updating Joomla? See https://gist.github.com/mbabker/d7bfb4e1e2fbc6b7815a733607f89281

cybersholt
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Tue Oct 18, 2016 6:46 pm

Re: Error decoding JSON data: Syntax error after update to 3.6.3

Postby cybersholt » Wed Oct 19, 2016 3:19 pm

Thanks for the info mbaker, I plan on debugging this before the end of week, in an effort to help. Would it be best to post which component, module, plugin etc... is the issue here or on github?

Marijke
Joomla! Apprentice
Joomla! Apprentice
Posts: 36
Joined: Thu Jan 18, 2007 1:36 pm
Location: Netherlands
Contact:

Re: Error decoding JSON data: Syntax error after update to 3.6.3

Postby Marijke » Wed Oct 19, 2016 3:24 pm

Thanks for your thourough information mbabker. I have no idea what to do now. Maybe we'll revert the site with a backup to 3.6.2. Hopefully someone will find the needle in the haystack so we can all smell the flowers again...
Need help with your Joomla site? Come find us at http://www.kovoks.nl!

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 23730
Joined: Mon Oct 27, 2008 9:27 pm
Location: Akershus, Norway

Re: Error decoding JSON data: Syntax error after update to 3.6.3

Postby Per Yngve Berg » Wed Oct 19, 2016 4:05 pm

Unpublish modules and pluhins one by one until the error goes away. Then you know which one is causing it. Examine the params field.

Buldre
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Tue Nov 10, 2009 2:44 pm

Re: Error decoding JSON data: Syntax error after update to 3.6.3

Postby Buldre » Wed Oct 19, 2016 8:00 pm

I disabled the «Akeeba Backup Notification Module» version 3.4.3, and then everything worked as normal. Said module is probably an outdated module, which not were deleted when I updated to a new version.

ibrentlam
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Tue May 03, 2016 5:02 pm

Re: Error decoding JSON data: Syntax error after update to 3.6.3

Postby ibrentlam » Wed Oct 19, 2016 9:56 pm

The error is pulled in the file:
/libraries/vendor/joomla/registry/src/Format/Json.php
line 72
I changed it to:
throw new \RuntimeException(sprintf('Error decoding JSON data: %s the bad data is: %s', json_last_error_msg(), $data));

so I could actually see the data.
what I saw was:
Error decoding JSON data: object property name separator ':' expected the bad data is: {""}
ok, so it looks like the bad data is {""}. Is this really invalid JSON? I checked via:
http://jsonlint.com/#
and it sure enough is. Valid would be something like:
{
"": ""
}
So off to find the culprit.
Did a sql query on extensions and came up dry, then:
select id, title, module, params from efzkh_modules where params like '%{""}%';
+----+---------------+-------------------+--------+
| id | title | module | params |
+----+---------------+-------------------+--------+
| 2 | Login | mod_login | {""} |
| 5 | Menu Stats | mod_stats | {""} |
| 11 | Footer | mod_footer | {""} |
| 14 | User Status | mod_status | {""} |
| 26 | Related Items | mod_related_items | {""} |
| 32 | Wrapper | mod_wrapper | {""} |
| 34 | Feed Display | mod_feed | {""} |
| 36 | Syndication | mod_syndicate | {""} |
+----+---------------+-------------------+--------+

found 8 modules.
so we nuke them:
update efzkh_modules set params = '' where params like '%{""}%';

and the blue screen of death has been banished. I can successfully log in to the admin side now.

Brent Laminack

maestro3229
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sat Apr 30, 2016 2:50 pm

Re: Error decoding JSON data: Syntax error after update to 3.6.3

Postby maestro3229 » Thu Oct 20, 2016 12:46 am

The {""} in the params column seems to be what was causing my problems as well. I did a search through several sites and found that was common in my sites that have been migrated from J! 1.5 or older, but not in any sites that were initially created in 3.x. In every case, the bad parameters were in core Joomla modules login, menu stats, footer and user status, just as reported above.

DreamlessDancer
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Tue Mar 29, 2011 8:14 pm

Re: Error decoding JSON data: Syntax error after update to 3.6.3

Postby DreamlessDancer » Thu Oct 20, 2016 3:37 am

I got this issue, but it's really, really, peculiar in how it's manifesting.

On one machine, selecting a module for editing will show the module editing screen for a brief few seconds, if I'm lucky, then it jumps to the following (according to Live HTTP Headers):

GET /administrator/index.php?option=com_modules&task=module.orderPosition&aa4c3a2860f8534088760d805ceaa19d=1&client_id=0&position=talent-8

And never does anything after that, I get a blank page.

But the darn thing works just fine and dandy when editing modules on other computers, ...

Now, I should also point out that the particular machine in which the above error manifests also cannot log into Disqus boards attached to most websites, it's always throwing an "Exception: e. is undefined".

P.S. the upgrade was from 3.6.0 to 3.6.3 and the 3.6.0 was fresh install.

apsilva
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 162
Joined: Tue Jul 12, 2016 11:22 pm

Re: Error decoding JSON data: Syntax error after update to 3.6.3

Postby apsilva » Thu Oct 20, 2016 7:51 am

That's another issue not related to this topic. To solve that clear the browser cache.

strix6
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Thu Oct 20, 2016 1:20 pm

Re: Error decoding JSON data: Syntax error after update to 3.6.3

Postby strix6 » Thu Oct 20, 2016 1:33 pm

I got the json blue screen error in the back-end after updating 3.6.2. to 3.6.3. The front-end is working fine.
So its hard to check what plugin/module is causing the error.

I know that using the 3.6.2. vendor map is not the way to go, but its the only way to get access to the back-end again.

Im not that technical, what is the best way to fix this problem?

ashleygonzalez
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Sat Jul 19, 2008 2:20 am

Re: Error decoding JSON data: Syntax error after update to 3.6.3

Postby ashleygonzalez » Thu Oct 20, 2016 2:23 pm

I have something similar going on but not quite the same as the accounts above. I updated 10 Joomla sites to 3.6.3. All are on the same server. Only one is throwing this JSON error on EDITING an article. Adding a new article works just fine. We cannot edit any articles. I have tried disabling the different admin modules and I've run some sql searches for {""} as well. I'm not finding anything. Any ideas? I'm at a loss.

HK66
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Jul 03, 2015 8:19 am

Re: Error decoding JSON data: Syntax error after update to 3.6.3

Postby HK66 » Thu Oct 20, 2016 6:20 pm

Same error after update 3.6.3
0 - Error decoding JSON data: Syntax error

any Idea?? :'(

Thank you for help!

User avatar
rbuelund
Joomla! Guru
Joomla! Guru
Posts: 639
Joined: Sat Feb 10, 2007 9:07 pm
Location: Århus
Contact:

Re: Error decoding JSON data: Syntax error after update to 3.6.3

Postby rbuelund » Thu Oct 20, 2016 8:25 pm

I get this error when trying to edit a specific user in backend through Community Builder or through the Joomla user admin, other users I can edit without problems - how come ?

The params field of the user i cannot edit contains loads of \\\\ signs please see attached !!?? - what is going on here ??
params.jpg
You do not have the required permissions to view the files attached to this post.
Last edited by rbuelund on Thu Oct 20, 2016 8:33 pm, edited 1 time in total.
Ronny Buelund
Coordinator of the Danish Joomla Translation Team: http://danskjoomla.dk
Owner of http://ableit.dk

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 23730
Joined: Mon Oct 27, 2008 9:27 pm
Location: Akershus, Norway

Re: Error decoding JSON data: Syntax error after update to 3.6.3

Postby Per Yngve Berg » Thu Oct 20, 2016 8:31 pm

Check the params filed for that user in the #__users table with phpmyadmin.


Return to “Migrating and Upgrading to Joomla! 3.x”

Who is online

Users browsing this forum: No registered users and 8 guests