Skip to Content Skip to Menu

🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

[#6659] Wrong params value after frontend profile editing

  • Car0l
  • Car0l
  • OFFLINE
  • Posts: 12
  • Thanks: 1
  • Karma: 0
  • Add-ons
7 years 6 months ago - 7 years 6 months ago #294451 by Car0l
Hi,

We are building a Joomla / CB site for one of our customers and we had a weird error after a Mac user edited his profile in frontend and saved it. It broke his profile while connected and he could not access any page after.

Taking a look at the users table, I saw that the value in params field was looking very strange, I pasted another user params there what corrected the error and then disallow params editing in CB configuration. I then asked a Mac friendyl coworker to register a profile on a Mac using Safari and then edit it in frontend.

While this coworker was going through these stages I looked at the users table. When she registered, the params field was left empty so the registration form does not write it neither with default value nor with something else. I then validated the pictures from the backend and the params field took the default values, until now everything is quite nice.

The situation changed when she began editing her profile in frontend. At the moment she saved it, a second params array was added to the field and while editing once more a third array came but mixed in the second one (attached screenshot).

This time there was no fatal error but that's for sure not a normal behaviour.

Taking a look, at other users in the table, I saw it was not the only one having strange value in params field and some quite different than this one (second screenshot). So probably another browser even if I can not be sure actually.

Anyone has an idea what could be causing that ?

Thanks in advance for your help.

Attachments:
Last edit: 7 years 6 months ago by krileon. Reason: Added [#6659] tag to subject

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
7 years 6 months ago #294452 by krileon
Ensure both CB and Joomla are completely up to date then run the below query to reset the params column. There was a bug in Joomla at some point that bugged the params column, which Joomla use to just ignore malformed params, but now throws an error.

www.joomlapolis.com/forum/255-developer-members-support/236528-0-error-decoding-json-data-syntax-error#293524

There's also known issues with some 3rd party extensions not correctly using getParam or setParam API to manipulate the user params and are instead json encoding/decoding the ->params on the user object directly which will cause double encode bugs like you're seeing. If issue persists after doing the above see if you've any 3rd party Joomla user extensions installed and try disabling them.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • Car0l
  • Car0l
  • OFFLINE
  • Posts: 12
  • Thanks: 1
  • Karma: 0
  • Add-ons
7 years 6 months ago #294457 by Car0l
Hi,

I am sorry but even with new user (registered yesterday) the params field gets changed when the profile is saved from frontend. And there is no very old rows in this DB as we began building this website about two month ago so with Joomla 3.6.5 and CB 2.1.2.

CB and Joomla are actually latest version and we have no third party extensions dealing with users except for CB and eventually Geommunity for CB but I think it only reads users nothing else (not sure).

I tried resetting one profile as you said and then edited it in frontend twice, this time with Chrome on Windows. Here is what I have in the DB : {"0":"{\"0\":\"{}\"}"}

I then edited the same profile in CB backend and here is the result : {"0":"{\"0\":\"{}\"}","language":"","editor":"","timezone":"Europe\/Zurich"}

Then back in frontend getting worse: {"0":"{\"0\":\"{\\\"0\\\":\\\"{}\\\"}\",\"language\":\"\",\"editor\":\"\",\"timezone\":\"Europe\\\/Zurich\"}","language":"","editor":"","timezone":"Europe\/Zurich"}

It seems each time I edit it, it adds something so I actually have no Json error but I presume it may change once the profile has been edited often enough and that's probably what happened with the user I encountered this error with.

Are you really sure this behaviour is normal ?

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
7 years 6 months ago #294481 by krileon
Is the userparams field available on frontend or do you have it set to not display on profile edit or configured not to have any of the param fields available? I am unable to confirm your issue on 2 local installs nor our demo site.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • Car0l
  • Car0l
  • OFFLINE
  • Posts: 12
  • Thanks: 1
  • Karma: 0
  • Add-ons
7 years 6 months ago #294504 by Car0l
The userparams field is set to be available nowhere and "Allow CMS user parameters" in global CB settings is set to no. When I encountered the problem, I also set the field to be read only to see if it fixes the problem but the result is the same.

This way it should not be changed except when editing the user in Joomla users component. No ?

I you want I can give you an access to the website and DB.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
7 years 6 months ago #294521 by krileon
Ok, this is probably happening due to the userparams being disabled entirely. Try setting "Allow CMS User Parameters" to "Yes" within CB > Configuration > User Profile. Next within CB > Field Management ensure the "params" field is set to display on profile edit. Reset your users params column to {} directly in your database and retest if issue persists.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum