Error decoding JSON data: Syntax error after update to 3.6.3

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.
User avatar
robwent
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 113
Joined: Tue Jan 26, 2010 11:26 pm
Location: Loughborough, UK
Contact:

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

Post by robwent » Wed Nov 02, 2016 2:59 pm

stupid logic.

You can reach the max by adding anything, it doesn't mean it's full of //

xiphias
Joomla! Apprentice
Joomla! Apprentice
Posts: 16
Joined: Fri Aug 11, 2006 10:19 am
Location: Netherlands
Contact:

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

Post by xiphias » Fri Nov 04, 2016 10:00 am

As for my K2 back-end issues, I ended up creating a new item and found out that the metadata field was filed with robots= author= while my current items had a JSON object in it.

Ran:
update XXX.YYY_k2_items set metadata="robots=follow
author=" WHERE metadata = "{\"robots\":\"\",\"author\":\"\",\"tags\":\"\"}";

and this fixed the problem for me.

odraregmx
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sat Nov 05, 2016 6:52 pm

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

Post by odraregmx » Sat Nov 05, 2016 6:59 pm


Thanks Phil, this link solve my problem.

If anyone still having problems may check this link and give it a try.... Please go rigth to the the last posts of the forum and find posts from robwent he wrote a script to check all params and rules columns.

Saludos

MaartenR
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Tue Apr 02, 2013 1:43 pm

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

Post by MaartenR » Mon Nov 07, 2016 12:52 pm

I have updated 3.6.2 to 3.6.4 and I also have this problem. The backend is working fine, but I get an error in the frontend.

In this tread there was a hint to change line 72 in /libraries/vendor/joomla/registry/src/Format/Json.php to:
throw new \RuntimeException(sprintf('Error decoding JSON data: %s the bad data is: %s', json_last_error_msg(), $data));

I now see the warning: Warning: Header may not contain more than a single header, new line detected in /chroot/home/......../libraries/joomla/application/web.php
on line 947

Call Stack
# Time Memory Function Location
1 0.2902 2423940 PlgSystemRedirect::handleException( ) .../redirect.php:0
2 0.2902 2423976 PlgSystemRedirect::doErrorHandling( ) .../redirect.php:90

3 0.2902 2424792 call_user_func_array:{/chroot/home/......../plugins/system/redirect/redirect.php:111}
( ) .../redirect.php:111
4 0.2902 2424808 JErrorPage::render( ) .../redirect.php:111
5 0.3091 2520312 JApplicationCms->toString( ) .../page.php:125
6 0.3091 2521012 JApplicationWeb->sendHeaders( ) .../cms.php:1176
7 0.3092 2521928 JApplicationWeb->header( ) .../web.php:678
8 0.3092 2522636 header ( ) .../web.php:947

And the message:
#0 Error decoding JSON data: Syntax error the bad data is:
{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_ca
tegory":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modif
y_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_e
mail_icon":"","show_vote":"","show_hits":"","show_noauth":"","urls_position":"","alternative_readmore":"
","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":
"","show_urls_images_frontend":""}

I have searched the database and found that this data was in table `content` and field `attribs`.

It appears in old content.
In newer content the `attribs` field contains:
{"show_title":"","link_titles":"","show_tags":"","show_intro":"","info_block_position":"","info_block_show_title":"","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":"","urls_position":"","alternative_readmore":"","article_layout":""}

I have run this sql-statement to correct the old content record. This has solved my problem.

UPDATE `xxxx_content` SET `attribs` = '{"show_title":"","link_titles":"","show_tags":"","show_intro":"","info_block_position":"","info_block_show_title":"","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":"","urls_position":"","alternative_readmore":"","article_layout":""}' WHERE attribs like '%{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":%';

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

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

Post by arvendal » Wed Nov 09, 2016 5:48 pm

I got the same error when updating to Joomla 3.6.4, but I found that it was the module BK Display New that in my case caused the problem.
Is it possible to clean up this module only? I use several instances of it. Or is it all about obsolete code in this module and it needs to be updated by the developer?

Best regards

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

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

Post by Per Yngve Berg » Wed Nov 09, 2016 5:52 pm

Nothing about code. It's the params field in the database.

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

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

Post by arvendal » Wed Nov 09, 2016 5:54 pm

Thanks Per Yngve, do I need to clean every instance of the module?

Best regards

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

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

Post by arvendal » Wed Nov 09, 2016 6:03 pm

When I try to edit one of the instances of BK Display News, it looks like this:
mod_dn.jpg
i e I cannot edit the params field.

What do I do?

Best regards
You do not have the required permissions to view the files attached to this post.

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

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

Post by Per Yngve Berg » Thu Nov 10, 2016 10:07 am

Do the database user have permissions for the params field?

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

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

Post by arvendal » Thu Nov 10, 2016 10:34 am

Per Yngve, thanks for you interest in solving this problem.
Yes, I have permission to edit the database.
When I used the "full edit" view in phpMyAdmin I was able to edit. It looks like this:
mod_dn2.jpg
But it doesn't help to delete the content in params field and resave the post (to re-enter the default values). The website sorks only if all instances of the module BK Display News is inactivated.

This is how the default values of this field look like:

Code: Select all

{"set_count":"5","ordering":"mostrecent","show_tooltips":"0","show_on_article_page":"1","mod_dn_style":"blog","set_column":"1","moduleclass_sfx":"","minus_leading":"","avoid_shown":"0","set_date_range":"0","set_date_since":"","set_date_until":"","set_category_type":"0","show_child_category_articles":"0","set_category_levels":"1","set_article_type":"0","set_article_id_extra":"","set_state":"1","set_article_archived_id_extra":"","set_auto_author":"0","set_author_alias":[""],"set_related":"0","set_metakeys":"","show_frontpage":"y","set_tags_type":"1","hide_current":"0","if_no_articles":"0","no_articles_message":"No articles are found!","show_title":"","link_titles":"","text_hover_title":"","title_tag":"span class=\"title\"","filter_title":"0","length_limit_title":"20","truncate_ending_title":"1","truncate_ending_title_sign":"...","show_text":"1","link_text":"0","filter_text":"0","preserve_tags":"<img>","limit_text":"0","length_limit_text":"100","truncate_ending":"1","truncate_ending_sign":"...","text_hover_text":"","get_image":"3","image":"1","link_image":"0","image_num":"","image_scale":"bestfit","image_bg":"FFFFFF","image_type":"","image_width":"","image_height":"","image_size":"","image_align":"0","image_margin":"","image_class":"0","image_class_name":"","image_default":"0","image_default_file":"","video":"","video_num":"","autoplay":"","vwidth":"","vheight":"","awidth":"","aheight":"","[youtube]":"","[youtube]_num":"","[youtube]_width":"","[youtube]_height":"","[youtube]_player":"","[youtube]_autoplay":"","[youtube]_loop":"","[youtube]_start":"","[youtube]_plyalist":"","[youtube]_controls":"","[youtube]_autohide":"","[youtube]_disablekb":"","[youtube]_fs":"","[youtube]_hd":"","[youtube]_modestbranding":"","[youtube]_cc_load_policy":"","[youtube]_showinfo":"","[youtube]_rel":"","[youtube]_iv_load_policy":"","[youtube]_theme":"","[youtube]_color":"","show_category":"0","show_category_title":"1","show_description":"","show_description_image":"","link_category":"","text_more":"","text_hover_category":"","use_modify_date":"0","show_date":"","format_date":"","show_author":"","show_readmore":"2","text_readmore":"","text_hover_readmore":"","readmore_class":"readmore btn","show_vote":"","rating_txt":"","show_hits":"","show_jcomment_counter":"0","comment_template":"Comments (%s)","show_tags":"","display_tags_type":"0","scroll_direction":"","scroll_speed":"1","scroll_delay":"30","scroll_mouse_ctrl":"1","scroll_height":"100","lead_space":"50","tail_space":"80","link_type":"0","link_target":"","window_width":"","window_height":"","window_menubar":"0","window_directories":"0","window_location":"0","window_resizable":"0","window_scrollbars":"0","window_status":"0","window_toolbar":"0","article_link":"0","item_id_type":"0","item_id_cat_type":"0","use_row_styles":"1","use_rows_template":"1","format":"%t <br\/>%T%c%S<br\/>%a - %d<br\/>%b<br\/>%p%v%i<br\/>%m<div class=\"item-separator\"> <\/div>","row_template":"($title_out!='' ? \"$title_out\" : '').  ($title_out!='' && $style != 'blog' && $style != 'featured' ? \"<br\/>\" : ''). ($tags_out!='' ? \"$tags_out\" : '').  ($rate_out!='' ? \"$rate_out<br\/>\" : '').  ($cat_out.$cat_desc_out!='' ? \"$cat_out$cat_desc_out\".'<br\/>' : '').  ($author_out!='' ? \"$author_out\" : '').  ($author_out!='' && $date_out!='' ? ' - ' : '').  ($date_out!='' ? \"$date_out\" : '').  ($author_out.$date_out!='' ? '<br\/>' : '').  ($before_out!='' ? \"$before_out<br\/>\" : '').  ($img_out!='' ? \"$img_out\" : '').  ($video_out!='' ? \"$video_out\" : '').  ($text_out!='' ? \"$text_out\" : '').  ($hits_out!='' ? \"($hits_out)\" : '').  ($jcomments_out<>'' ? \"$jcomments_out\" : '').  ($readmore_out!='' ? \"<br\/>$readmore_out\" : '').  (!$last ? '<div class=\"item-separator\"> <\/div>' : '')","show_empty_module":"0","show_title_auto":"0","mod_title_format":"<h3>%c<\/h3>","use_module_template":"0","module_format":"%t %c %s %r %f","module_template":"($mod_title_out != '' ? \"$mod_title_out\" : ''). $mod_cat_out. $scroll_start. $rows_out. $scroll_finish","on_prepare_content_plugins":"1","mod_dn_context_content":"mod_dn.content","before_display_content_plugins":"0","mod_dn_context_before":"mod_dn.featured","raw_data_change":"","force_builtin_rating":"0","jcomments":"0","cache":"1","cache_time":"900","module_tag":"div","bootstrap_size":"0","header_tag":"h3","header_class":"","style":"0"}
What can be done?

Best regards
You do not have the required permissions to view the files attached to this post.

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

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

Post by robwent » Thu Nov 10, 2016 10:47 am

@arvendal That's valid so maybe you have a different issue.

You can validate json here: http://codebeautify.org/jsonvalidator

Have you checked with the extension creator to see if it is compatible with 3.6.3?

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

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

Post by arvendal » Thu Nov 10, 2016 11:03 am

@Per-Ynge, thanks for your help.
Yeah, I have concluded that there must be some incompability issue. I have asked for a solution in the developer's forum, but unfortunately it looks like the forum has no up-to-date q&a's.
I must look for an alternative module. I need a module that can list articles using both author and author_alias criteria in the same list.

Best regards

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

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

Post by robwent » Thu Nov 10, 2016 11:46 am

I just tried installing the BK DisplayNews 2.7 in Joomla 3.6.4 and it seems to be working for me without any issues.

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

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

Post by arvendal » Thu Nov 10, 2016 12:35 pm

@robwent, thanks for your answer. That's sounds like a hope.
I tried to re-install over the old version, but that did not work. Perhaps there's some combined problem with another extension I use. Or I need to do an uninstall before re-install?
Anyhow, I must carry out a further checkup before I give up on this module.

Best regards

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

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

Post by robwent » Thu Nov 10, 2016 1:02 pm

Test on a backup.

When I installed I got this message:

Release Notes
2.1 Upgrade:
After upgrade from previouse versions:
Article and module templates should be reset.
Configuration parametersshould be verified.

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

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

Post by arvendal » Thu Nov 10, 2016 1:39 pm

@robwent: Thanks fo the advice. I'll check it out.
Hopefully this will solve the issue.

Best rgds

Peakoverload
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 107
Joined: Thu Feb 16, 2006 10:07 pm

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

Post by Peakoverload » Sun Nov 13, 2016 7:45 pm

I've got a really weird thing happening. The upgrade to 3.6.3 went fine and as far as I can see everything is working fine. However one user tells me whenever he tries to log in he gets this JSON Syntax error. I can't replicate this at all on any of my accounts and so far no other user has reported the same problem. The only way I can see this error is if I try to edit his user account from the Administrator backend, all other accounts edit fine. The only difference between his account and any others is that he is also an Administrator but other Administrator accounts aren't affected.

I've tried running this script https://github.com/robwent/joomla-json-db-check this reported that it had fixed a number of errors but I also ran it again to "Check for All Invalid Errors"

This brought up a long list one of which being:

Checking table: *****_users, column params
Row 907 is not valid JSON. Error: (Syntax error)
Content: {\"editor\":\"\",\"timezone\":\"Europe\\/London\",\"language\":\"en-GB\"}

As this is the Users table it seems to be the most likely cause for this one user having a problem and indeed Row 907 is the user that is affected.

So the Params for this user are:

{\"editor\":\"\",\"timezone\":\"Europe\\/London\",\"language\":\"en-GB\"}

The params for all other normal registered users are:

{"editor":"","timezone":"Europe\/London","language":""}

The params for other Admins are (this one is for my account which works fine):

{"editor":"","timezone":"Europe\/London","language":"","admin_style":"","admin_language":"","helpsite":""}


I'm not a developer, I dont' understand SQL and barely understand even what params are. But I'm assuming that if I copy my user account params and paste them over his then that should fix the problem?

There is another thing that puzzles me. There are two other user accounts both of whom are not Administrators, nor have they ever been, one who hasn't visited the site in 3 years, the other just a month ago and yet both of them have the following as their params:

{"admin_style":"","admin_language":"","language":"","editor":"","helpsite":"","timezone":""}

Is that correct, shouldn't they both be {"editor":"","timezone":"Europe\/London","language":""}

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

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

Post by robwent » Sun Nov 13, 2016 7:58 pm

The quote marks shouldn't be escaped. Replace it with the following:

Code: Select all

{"editor": "","timezone": "Europe\/London","language":"en-GB"}

wadesigns
Joomla! Intern
Joomla! Intern
Posts: 71
Joined: Fri Oct 02, 2009 8:39 am

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

Post by wadesigns » Mon Nov 14, 2016 9:01 am

Hi there, I have ran 3 updates today and 1 update came up with this error. I am not DataBase savey and therefore there has to be something that Joomla can sort so this does not keep happening.

My clients if they have this issue will go mad so really need a patch to stop this or and easy way to sort - can you advise ASAP :eek:

Peakoverload
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 107
Joined: Thu Feb 16, 2006 10:07 pm

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

Post by Peakoverload » Mon Nov 14, 2016 1:26 pm

robwent wrote:The quote marks shouldn't be escaped. Replace it with the following:

Code: Select all

{"editor": "","timezone": "Europe\/London","language":"en-GB"}
Ahh that's perfect. Implemented that and now all working again as it should.

Many thanks for the help.

User avatar
Chacapamac
Joomla! Guru
Joomla! Guru
Posts: 868
Joined: Wed Feb 20, 2008 6:50 am
Location: Canada, Montreal
Contact:

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

Post by Chacapamac » Wed Nov 16, 2016 2:05 pm

I really like to see a concise post on how to fix this.
I can see many Fix, Check but I didn’t see a clear “understand the problem & How to fix” post

Can somebody tell me if the following are safe to used

• SQL Query (I get 3 difference query?)
update `xxxx_modules` set params="" WHERE params = "{\"\"}";

updatexxxx_modulesset params="" WHERE params = "{\"\"}";

update xxxx_modules set params="" WHERE params = "{\"\"}";

• Check-Fix Patch (From Robwent here —> https://github.com/joomla/joomla-cms/issues/12460)
I've added an updated version here: https://github.com/robwent/joomla-json-db-check

It will first fix any bad empty param fields (Jupgrade?) and then can do a full check for invalid values and report the problems (Without any modifications).

We need a clear explanation, how the problem appear & what are the extend of check and fix needed and what way is the proper way.

Sadly, I don’t have enough knowledge to do it myself.
Can God help us?
Marketing, SEO, Web development - Powered by Joomla!
http://www.grafcomm.ca/

alankimrey
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Thu Jan 03, 2008 8:31 pm
Location: Oak Park, IL
Contact:

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

Post by alankimrey » Thu Nov 17, 2016 11:11 pm

mojito wrote:Thanks guys for the extra info. Here is an image of what was wrong in my db for others ref. It may be these that are an issue for others. http://cambs.eu/blog/entry/this-week-in ... web-design
This did it for me. Had only 14 bad records. Sweet.

User avatar
Chacapamac
Joomla! Guru
Joomla! Guru
Posts: 868
Joined: Wed Feb 20, 2008 6:50 am
Location: Canada, Montreal
Contact:

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

Post by Chacapamac » Fri Nov 18, 2016 4:06 pm

I find (I Think, as I don't know Json) I find a good validator with error spotting and possible fix at —> https://jsonformatter.curiousconcept.com

I was able to fix 2 sites (Local copy first & Live) (with backup first) wit the “More OptionsRobwent Script (Thanks a thousands times) —> https://github.com/robwent/joomla-json- ... ck.php#L89

With this “More Options” script I was able to spot other problems that I was able to fix…. :D

For People wit Acymailing Json Problem —> https://www.acyba.com/forum/2-acymailin ... -data.html

Joomla is simply the best community ever, try that level of patience and help on other well known other CMS forums!
Can God help us?
Marketing, SEO, Web development - Powered by Joomla!
http://www.grafcomm.ca/

mhshakouri
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Dec 01, 2016 4:40 pm

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

Post by mhshakouri » Thu Dec 01, 2016 4:47 pm

Another solution:
I had not enough time to read all 113 replies to the post, but I encountered the same problem on Joomla 3.6.4.
At some points, I found out that I have to disable/re-enable not all but most of the extensions.
It also helped about the custom modules I wrote my self (some of them used json_decode function in them), so the data was saved correctly.

Another strange thing I came across was the T3 Plugin (T3 Framework by JoomlaArt).
Since T3 integrates usage of it's own custom fields functionality to be available to add to MenuItems, Contents, Categories, with the new json_decode login embeded in new versions of joomla, it failed to create new records almost everywhere in joomla ecosystem, including menu items, categories and contents.
Since before knowing this I was doing a redesign based on Gantry5 Framework I not needed the T3 Framework anymore, so by remove the T3 framework the problem was solved easily.

So the solution is :
Remove T3 (Framework) if applicable and you don't plan to use it.
Ofcourse I think guys at Joomla Art would be able to create a solution for this situation.
Maybe they have done that so far, but they must create a migration utility at some level to recheck saved data, since the updated version still contains this errornous process.

mhshakouri
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Dec 01, 2016 4:40 pm

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

Post by mhshakouri » Thu Dec 01, 2016 4:49 pm

Hint:
to be able to find what's going wrong, turn system debug to on either by configuration.php or the global configuration menu item.

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

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

Post by robwent » Sat Dec 03, 2016 2:22 am

@mhshakouri have you mentioned that on their issue tracker?

https://github.com/t3framework/t3/issues

If you know what the issue is then it could probably be really helpful to let them know!

pggadmin
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Mon Dec 05, 2016 4:41 am

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

Post by pggadmin » Mon Dec 05, 2016 4:57 am

Well this was a fun problem.
In the end it was the 'params' field in the abcde_users table.
It was populating with many "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" in some profiles, some corrupt plugin presumably.

Coincidentally I had started getting an SQL error "Got a packet bigger than 'max_allowed_packet' bytes SQL=UPDATE..." when certain Community Builder profiles were trying to be updated. For whatever reason, the number of "\\\\\\\\\\\" were growing for certain profiles - seemingly the oldest one and the ones that were being updated the most often. Eventually the field data got too large.

I thought I had solved the problem when I moved the 'params' field from an unpublished tab, to a published tab, hoping that the params field was now being correctly written. But only for some people.
I hadn't upgraded to 3.6.4 yet (was on 3.6.2) - in the hope this would solve the problem. Well it did not, and only made several other profiles that were fine, not be viewable anymore to just a public user.

Problem was solved by updating all of the params fields in the 'abcde_users' table (where abcde is your database prefix) to an empty set of curly brackets ie "{}" with no quotation marks.

SQL statement: UPDATE `XXXX_users` SET `params` = '{}'

This is also outlined here. https://www.joomlapolis.com/forum/153-p ... or?start=6

and here: http://cambs.eu/blog/entry/this-week-in ... web-design

Note that I was not getting the "Error decoding JSON data: Invalid Syntax" error until I clicked into one particular profile in the backend. It was an SQL error to begin with "Got a packet bigger than 'max_allowed_packet' bytes SQL=UPDATE..."

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

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

Post by robwent » Mon Dec 05, 2016 5:15 am

@pggadmin that sounds like magicquotes is on but hard to believe that would be the case.

If you deleted all the params entries of the users table, then you just wiped out any users settings.

yogiman
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Fri Dec 25, 2009 9:50 pm
Contact:

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

Post by yogiman » Tue Dec 13, 2016 2:50 pm

Hi :-)

I have a similar problem with this libraries in 3.6.4

any solution?
I'm phreaking out! :-(

exception 'RuntimeException' with message 'Error decoding JSON data: Syntax error' in /web/htdocs/www.yoga-acrobatico.it/home/libraries/v ... son.php:72 Stack trace: #0 /web/htdocs/www.yoga-acrobatico.it/home/libraries/v ... y.php(366): Joomla\Registry\Format\Json->stringToObject('{"menu_image":"...', Array) #1 /web/htdocs/www.yoga-acrobatico.it/home/components/ ... e.php(174): Joomla\Registry\Registry->loadString('{"menu_image":"...') #2 /web/htdocs/www.yoga-acrobatico.it/home/libraries/l ... y.php(408): ContentModelArticle->getItem() #3 /web/htdocs/www.yoga-acrobatico.it/home/components/ ... ml.php(42): JViewLegacy->get('Item') #4 /web/htdocs/www.yoga-acrobatico.it/home/libraries/l ... y.php(664): ContentViewArticle->display() #5 /web/htdocs/www.yoga-acrobatico.it/home/components/ ... r.php(113): JControllerLegacy->display(true, Array) #6 /web/htdocs/www.yoga-acrobatico.it/home/libraries/l ... y.php(702): ContentController->display() #7 /web/htdocs/www.yoga-acrobatico.it/home/components/ ... nt.php(38): JControllerLegacy->execute(NULL) #8 /web/htdocs/www.yoga-acrobatico.it/home/libraries/c ... r.php(405): require_once('/web/htdocs/www...') #9 /web/htdocs/www.yoga-acrobatico.it/home/libraries/c ... r.php(380): JComponentHelper::executeComponent('/web/htdocs/www...') #10 /web/htdocs/www.yoga-acrobatico.it/home/libraries/c ... e.php(191): JComponentHelper::renderComponent('com_content') #11 /web/htdocs/www.yoga-acrobatico.it/home/libraries/c ... e.php(230): JApplicationSite->dispatch() #12 /web/htdocs/www.yoga-acrobatico.it/home/libraries/c ... s.php(261): JApplicationSite->doExecute() #13 /web/htdocs/www.yoga-acrobatico.it/home/index.php(49): JApplicationCms->execute() #14 {main}

User avatar
mlucas77
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Sat Oct 23, 2010 12:24 am

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

Post by mlucas77 » Fri Dec 16, 2016 9:40 pm

Joomla Support

I am experiencing this behavior in version 3.6.5, not sure how to fix this? I see so many post about the parms in the database? Can someone send me the step by step instructions to repair this frustrating bug in joomla!

Banner parms

{"imageurl":"images\/banners\/AcuraofFremontRegionalLargeJan2015.jpg","width":730,"height":260,"alt":""}


Post Reply

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