How to Fix the "Error Decoding JSON Data: Syntax Error" in Joomla When Logging into the Admin Area

灰暗的星星灰暗的星星灰暗的星星灰暗的星星灰暗的星星
 
分类:技术文章

A video tutorial on how to Fix the "Error Decoding JSON Data: Syntax Error" in Joomla.

Before trying this fix, be sure to backup your Joomla database. Since, in this case you cannot login to the admin area of your site, here is how to back up your Joomla database using phpMyAdmin: https://youtu.be/fwUmn4kMIf4 In this video there is an SQL command supplied to run on your database. For your convenience,

here it is for cutting and pasting: update xxxx_modules set params = '' where params like '%{""}%';

To read more about this problem and fix, it was found in the Joomla forums at: https://forum.joomla.org/viewtopic.ph...

Here is a transcript of the audio of this video:

Hey there Joomla fans! Thanks for tuning in again to Cybersalt's Basic Joomla Channel.

I'm Tim Davis. A big shout-out to my wife today for being patient with me fixing her joomla site that broke. A few Joomla updates ago, when we updated her site, something broke and she could no longer log into the admin area.

She'd get the "error decoding json data: syntax error." That's the subject of this tutorial now, "How to fix the "error decoding json data: syntax error".

Let's head on over to the computer and check it out! Since I can't log in and run any backup extensions that it uses I want to make a backup of this database because we're going to be going right into the database and running a little bit of code.

Now that code that I found is in the Joomla forums in a couple of places and I'll place a link in the description below where you can go and read in one of those locations. I'm also going to place a card above, at the end of the video, and a link in the description below to the tutorial on how to backup your database using phpMyAdmin.

It's really important to do that because if something goes wrong while we're running this code and you don't have a backup then your problems have just multiplied.

So, the first thing that I want to show you here is that when I go to try to login, instead of the login form coming up we get this error here; "error decoding json data: syntax error" and that's the problem that we want to fix.

So, to do that we're going to go into the cpanel hosting account for my wife's account - cpanel is what I use on Cybersalt Hosting - once we're logged in there and once you've backed up your database - REALLY, you REALLY want to do that, use that tutorial that I made - once you login to cpanel you're going to go down to phpMyAdmin in the databases section and click it.

When we click on it we're taken to a place where we're presented with the databases that belong to this web hosting account. Here's keysbythe_88keys. It's the only database (information schema is just basic and serves a different purpose.)

We're going to click on that database that runs the joomla site, keysbythe_88keys, or whatever your database is that runs your site and we'll be presented with the tables that run her Joomla site.

Next we want to click on "SQL" and it's here in this SQL tab we have this field where we can post in a command that is going to search a certain table and look and change some things that will fix that error.

Now here in this Wordpad document I've got the code that we want to run: update xxxx_modules set params = '' where params like '%{""}%'; I'll put that code in the description of the video as well so you can cut and paste.

What we're going to do is select that whole line, I'm going to right click and copy it, get that window out of the way, and now I'm going to click in this window to run the SQL query, which is what it is, and click paste. Now, before I click "go" and run this, we need to change the four x's before "_modules" to whatever the prefix is for tables in your database.

When I look over here in this column I see on this site it is "cyb." So you want to match the prefix replacing the four Xs in this line with whatever the prefixes are for your database - CYB in this case.

And so this this SQL query is going to run on the module on the table "modules" in this database - cyb_modules - and it's going to do some looking around and do its thing. So I click go and once it's run it says up here "4 rows affected."

That encourages me because if no rows were affected probably nothing was fixed, but now we can go back to the backend login for my wife's site - 88keysbythesea.com/administrator and I'm just going to enter again and lo and behold there's the login form and the site is fixed.

If this was helpful please give me a thumbs up and if you haven't subscribed to the channel please do so! Click subscribe and don't forget to ring the bell next to subscribe that will let you get updates as soon as new videos are posted to the channel. Thanks for watching, enjoy your Joomla sites.

God bless.