Topic-icon Presales question

Support Specialist
1 year 8 months ago - 1 year 8 months ago #68182 by alzander
Replied by alzander on topic Presales question
There does seem to be an issue with the current implementation for fetching the user's language string. We diagnosed the problem and have a 1 line code fix we'd love for you to implement and verify the correct behavior.

To do so, please edit:
/components/com_jfbconnect/models/loginregister.php
Around line 300, you should see:
$lang = $app->input->get(ApplicationHelper::getHash('language'), '', 'COOKIE');
$user['language'] = $lang;

Update that to:
$user['language'] = JHelperContent::getCurrentLanguage();

The previous method works if the Language Switcher is configured to use a cookie to store the language. The default option was changed to Session and we apparently didn't support that.

Please test and let us know if that gets you going. We will ensure this is included in the next release of JFBConnect as well.

Thanks,
Alex
Last edit: 1 year 8 months ago by alzander.
The topic has been locked.
Active Subscriptions:

None
1 year 8 months ago - 1 year 8 months ago #68183 by romagromov
Replied by romagromov on topic Presales question
So, I should replace 2 lines with the new one, correct?
And what happens when a new version of a component is released?
Will I lose those changes?
Last edit: 1 year 8 months ago by romagromov.
The topic has been locked.
Support Specialist
1 year 8 months ago #68192 by alzander
Replied by alzander on topic Presales question
Yes, replace the 2 lines with the new one.

We have this in our issues list to be included in the next release, so you shouldn't have to implement this change in the future. We'd love your feedback if the update behaves as you expect though. We tested on our development systems, but every site is different and multi-lingual can be especially finnicky, so any feedback is very helpful.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
1 year 8 months ago #68193 by romagromov
Replied by romagromov on topic Presales question
Ok Alzander, it's working now. Thanks.
Please do not forget to include this edit in next release.
The topic has been locked.