Language parameter not saving on user profile edit

3 years 2 months ago - 3 years 2 weeks ago #323426 by boyjahq
When a logged in user tries to change the language parameter in profile edit, the change does not save. For example if the language is set to English and they change to Japanese and then save, going back to the parameter edit shows that the change in language does not save. It remains as English. However, if they happen to go to the Japanese side of the site and then change the language to Japanese and save, the change is retained. The reverse is also true. The only way for a user who has Japanese set as language parameter to change it is to first go to the English version of their profile, then change the language parameter to English and save. In that case, the modified parameter is properly saved.

Is there a setting somewhere that we need to adjust so that language parameter settings can be changed and saved regardless of the language version of profile edit they happen to be using?

Please Log in to join the conversation.

3 years 2 months ago #323434 by krileon
Strange, seams to save fine in my tests. Does it save if you edit the user in backend and change it there?


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 to join the conversation.

3 years 1 month ago - 3 years 1 month ago #323451 by boyjahq
The language parameter saves normally when it is changed in the Admin backend.

I figured out the issue. Turns out we have an AutoAction that sets the language parameter for all users at time of registration based on whichever language version of the site they use when they register. We do not show the language selection option on the registration form.

So if they register on the Japanese side, the AutoAction automatically sets the language parameter to {"language":"ja-JP","editor":"","timezone":""}

And if they register on the English side, the AutoAction automatically sets the language parameter to {"language":"en-GB","editor":"","timezone":""}

The issue was that we were too zealous in choosing our triggers. We had all of these chosen:

joomla_onUserAfterSave
onAfterNewUser
onAfterUserRegistration
onAfterUserUpdate

So what was happening makes perfect sense. We removed triggers
joomla_onUserAfterSave
onAfterUserUpdate

and now the parameter saves as it is supposed to.

For the purposes that I described above do you think that using these triggers for the auto action is correct?
onAfterNewUser
onAfterUserRegistration

Please Log in to join the conversation.

3 years 1 month ago #323462 by krileon

For the purposes that I described above do you think that using these triggers for the auto action is correct?
onAfterNewUser
onAfterUserRegistration

Yes, if you only want it to apply to new registrations.


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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.176 seconds

Facebook Twitter LinkedIn