Joomla 3.6.4 update gone wrong - Error decoding JSON data: Syntax error

Need help upgrading your Joomla! website or converting to Joomla! 3.x?

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.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
bushwhacking
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Tue Nov 01, 2016 2:31 pm

Joomla 3.6.4 update gone wrong - Error decoding JSON data: Syntax error

Post by bushwhacking » Tue Nov 01, 2016 2:42 pm

Hi.

I done a simple update, which I have done on many occasions and have now crashed the website and lost Admin access!

Earlier today I logged into Joomla Admin to notice there were 20 extension updates and a Joomla 3.6.4 update.
joomla-updates.jpg
I first backed-up the website then installed all 20 extensions and tested the site (all was fine)

I then updated to Joomla 3.6.4, and the error occurred.
joomla-admin-error.jpg
I no longer have access to Admin and the site is down, so I cant restore the site back to the old version!
joomla-site-down.jpg
What went wrong?

I touched nothing except do what they requested, and that's update the platform.

All help would be appreciated (I do have access to my host C-Panel, if that's any consolation)

Thanks up-front for any help.
You do not have the required permissions to view the files attached to this post.

bushwhacking
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Tue Nov 01, 2016 2:31 pm

Re: Joomla 3.6.4 update gone wrong - Error decoding JSON data: Syntax error

Post by bushwhacking » Tue Nov 01, 2016 5:03 pm

!! Any help?

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

Re: Joomla 3.6.4 update gone wrong - Error decoding JSON data: Syntax error

Post by apsilva » Tue Nov 01, 2016 5:05 pm

read viewtopic.php?f=710&t=937036 for cause and possible solutions.

bushwhacking
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Tue Nov 01, 2016 2:31 pm

Re: Joomla 3.6.4 update gone wrong - Error decoding JSON data: Syntax error

Post by bushwhacking » Wed Nov 02, 2016 3:09 am

Thanks apsilva, but the post you pointed to is more confusing than my existing situation.

Its based on debates and not a clear fix. Must I try all the methods discussed? Or is there a specific fix that I missed?

What are library/vendor files? and how do I locate the library folder in my host C-Panel to disable the JB Library plugin?

Its confusing reading the answers in that specific thread that point to various fixes but don't explain the exact location of the files and a exact fix via my host C-Panel.

I am not Joomla high tech savy.

The only library I know is the public library down the road that contains books.

But what I do know is, the website has been down for 24 hours and is now costing bucks.

Is there a way of accessing Akeeba Backup in my host C-Panel to restore the site back to the way it was prior to Joomla crashing it?

User avatar
abernyte
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4189
Joined: Fri May 15, 2009 2:01 pm
Location: Écosse - Scozia - Escocia - Škotija -स्कॉटलैंड

Re: Joomla 3.6.4 update gone wrong - Error decoding JSON data: Syntax error

Post by abernyte » Wed Nov 02, 2016 3:45 am

If you can access your site files via the file explorer in the Cpanel your back ups are in administrator/components/com_akeeba/ backup.
Restoring to 3.6.2 just opens you to the ongoing and very active exploit that was patched at 3.6.4.
Your error is being caused by a third party extension which is badly written and causing the error checking introduced at 3.6.3 to flag the issue.
You might be better off accessing the database via phpMyAdmin and unpublishing the third party extensions one at a time until you find which is causing the site to choke.
"Those who expect to reap the blessings of freedom must, like men, undergo the fatigue of supporting it." Thomas Paine

LGjoomla
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Fri Oct 08, 2010 5:08 pm

Re: Joomla 3.6.4 update gone wrong - Error decoding JSON data: Syntax error

Post by LGjoomla » Wed Nov 02, 2016 5:13 am

The fastest resolution is this:
1. Go to PHPMyAdmin
2. Click the SQL tab
3. Type in:
update xxxx_modules set params = '' where params like '%{""}%';
(where xxxx is your table prefix)
4. Click Go

bushwhacking
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Tue Nov 01, 2016 2:31 pm

Re: Joomla 3.6.4 update gone wrong - Error decoding JSON data: Syntax error

Post by bushwhacking » Wed Nov 02, 2016 7:12 am

Hey, hey, hey. I'm back on-line (time to open the bottle brandy to celebrate my victory!)

I never slept last night I was so stressed.

Nonetheless. Thanks for all your input, but it never worked (maybe it was me not following correct instructions!)

I found a fix in github

https://github.com/joomla/joomla-cms/issues/12460

In C-Panel they suggested /libraries/vendor/joomla/registry/src/Format and edit Json.php on line 72 with the following:

throw new \RuntimeException(sprintf('Error decoding JSON data: %s', json_last_error_msg()));

But that never worked because the php code was already the same as above.

A different user suggested to edit line 67 to:

$decoded = json_decode(html_entity_decode($data));

By mistake I edit line 72 with the above code and not line 67!!

It worked, so I'm going to leave it as is.

I obviously never fixed the issue but at least the site is back online and I have Admin access.

User avatar
abernyte
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4189
Joined: Fri May 15, 2009 2:01 pm
Location: Écosse - Scozia - Escocia - Škotija -स्कॉटलैंड

Re: Joomla 3.6.4 update gone wrong - Error decoding JSON data: Syntax error

Post by abernyte » Wed Nov 02, 2016 8:22 am

The good news is that you are back on line.
The bad news is that you have over written a core file which may get restored at the next update and you are back where you started.
You still have a third party extension that is causing this.
"Those who expect to reap the blessings of freedom must, like men, undergo the fatigue of supporting it." Thomas Paine

arvendal
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 193
Joined: Wed Mar 28, 2007 1:19 pm
Location: Sweden

Re: Joomla 3.6.4 update gone wrong - Error decoding JSON data: Syntax error

Post by arvendal » Mon Nov 14, 2016 6:17 pm

Hi,

Just a small note:
For me the problem originated from the content table (articles), I found this in the attribs field:

Code: Select all

{show_title:\,link_titles:\,show_intro:\,show_category:\,link_category:\,show_parent_category:\,link_parent_category:\,show_author:\,link_author:\,show_create_date:\,show_modify_date:\,show_publish_date:\,show_item_navigation:\,show_icons:\,show_print_icon:\,show_email_icon:\,show_vote:\,show_hits:\,show_noauth:\,alternative_readmore:\,article_layout:\}
and this in the metadata field:

Code: Select all

{robots:\,author:\,rights:\,xreference:\}
Correcting the escapes did the trick.

So I think there's a more complex origin for this phenomenon than just a third party extension problem.

Bets regards

User avatar
robwent
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 113
Joined: Tue Jan 26, 2010 11:26 pm
Location: Loughborough, UK
Contact:

Re: Joomla 3.6.4 update gone wrong - Error decoding JSON data: Syntax error

Post by robwent » Tue Jan 03, 2017 2:51 am

There is a script linked to in the post linked from the second post in this thread which will help diagnose any problems and fix common issues.

edit: the script: https://github.com/robwent/joomla-json-db-check yes, I wrote it but the only reason for pushing it is to help people. Updating Joomla isn't going to fix the problem so don't wait for an update.

user1976
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Wed May 14, 2014 8:57 pm
Contact:

Re: Joomla 3.6.4 update gone wrong - Error decoding JSON data: Syntax error

Post by user1976 » Wed Mar 14, 2018 10:28 am

robwent wrote:There is a script linked to in the post linked from the second post in this thread which will help diagnose any problems and fix common issues.

edit: the script: https://github.com/robwent/joomla-json-db-check yes, I wrote it but the only reason for pushing it is to help people. Updating Joomla isn't going to fix the problem so don't wait for an update.
I am run this script:

Fetching contributors…
Cannot retrieve contributors at this time


Locked

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