J3 Issue ?
avatar pmleconte
pmleconte
11 Jun 2019

Steps to reproduce the issue

Update a french website where helpsite is help.joomla.fr

Expected result

In #__users tables, params should contains "helpfile":""

Actual result

In #__users tables, params contains ,, causing a JSON error

System information (as much as possible)

Joomla 3.9.7

Additional comments

File 3.9.7-2019-05-16.sql contains incorrect reset information

avatar pmleconte pmleconte - open - 11 Jun 2019
avatar joomla-cms-bot joomla-cms-bot - change - 11 Jun 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 11 Jun 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 11 Jun 2019
Labels Added: J3 Issue
avatar franz-wohlkoenig franz-wohlkoenig - labeled - 11 Jun 2019
avatar HLeithner
HLeithner - comment - 11 Jun 2019

@alikon could you confirm this?

avatar pmleconte pmleconte - change - 11 Jun 2019
Title
"Error decoding JSON data: Syntax error" message after 3.9.6 to 3.9.7 update
[3.9.7] "Error decoding JSON data: Syntax error" message after 3.9.6 to 3.9.7 update
avatar pmleconte pmleconte - edited - 11 Jun 2019
avatar pmleconte
pmleconte - comment - 11 Jun 2019

Correct command should be :
UPDATE #__users SET params = REPLACE(params, '"helpsite":"https:\/\/help.joomla.fr\/index.php?option=com_help&keyref=Help{major}{minor}:{keyref}"', '"helpsite":""');

avatar HLeithner
HLeithner - comment - 11 Jun 2019

The new value have to be replaced for the next release and as workaround.

avatar pmleconte
pmleconte - comment - 11 Jun 2019

French websites are going down one by one.....

avatar mbabker
mbabker - comment - 11 Jun 2019

TBH, you would've been better off leaving the user params alone versus trying to remove it. With the param gone from the UI, and the code not reading it, it would eventually cycle itself out as preferences get updated or just sit there and take up 50 bytes in a database field.

Now you've got corrupt JSON to deal with.

avatar franz-wohlkoenig franz-wohlkoenig - change - 11 Jun 2019
Title
[3.9.7] "Error decoding JSON data: Syntax error" message after 3.9.6 to 3.9.7 update
"Error decoding JSON data: Syntax error" message after 3.9.6 to 3.9.7 update
avatar franz-wohlkoenig franz-wohlkoenig - edited - 11 Jun 2019
avatar HLeithner
HLeithner - comment - 11 Jun 2019

My suggestion to fix this would be.

UPDATE #__users SET params = REPLACE(params, '",,"', '","');

Would this work without side effects?

avatar pmleconte
pmleconte - comment - 11 Jun 2019

I tried
UPDATE #__users SET params = REPLACE(params, ',,', ',"helpsite":"",');

It recreates helpsite param.

avatar HLeithner
HLeithner - comment - 11 Jun 2019

replacing only ,, could lead to modify data of other fields

avatar richard67
richard67 - comment - 11 Jun 2019

I tried
UPDATE #__users SET params = REPLACE(params, ',,', ',"helpsite":"",');

It recreates helpsite param.

There is no need to recreate the helpsite parameter, it is not used anymore in the code. It is only necessary to make Json valid again, i.e. remove the ,,, but in a safe way.

avatar HLeithner
HLeithner - comment - 11 Jun 2019

I created a PR to fix this #25177

avatar HLeithner
HLeithner - comment - 11 Jun 2019

normally the helpsite is between 2 other parameters I don't think that it's possible that the ,, are at the beginning or the end...

avatar richard67
richard67 - comment - 11 Jun 2019

@HLeithner I think the same, but am not 100% sure. But I guess you wanted to comment that in your PR.

avatar alikon
alikon - comment - 11 Jun 2019

@pmleconte please test #25177

avatar richard67
richard67 - comment - 11 Jun 2019

@pmleconte Fixed with new release 3.9.8.

avatar richard67
richard67 - comment - 11 Jun 2019

@pmleconte And thanks for reporting it so fast.

avatar zero-24
zero-24 - comment - 11 Jun 2019

closing as this has been patched by 3.9.8 thanks everyone involved.

avatar zero-24 zero-24 - close - 11 Jun 2019
avatar zero-24 zero-24 - change - 11 Jun 2019
Status New Closed
Closed_Date 0000-00-00 00:00:00 2019-06-11 20:50:50
Closed_By zero-24

Add a Comment

Login with GitHub to post a comment