Forum Discussion
hi miikka
don't think something changed around that.
I had a quick look at the logs and I see some messages like this, so maybe the problem is somewhere else in the common init logic:
The following has evaluated to null or missing: ==> SUPPORTED_LANGUAGES_MAPPING[trimmedLang] [in template "language-detection.ftl" at line 44, column 29]
Failed at: #local supportedLang = SUPPORTED_LANG... [in template "language-detection.ftl" in function "isLanguageSupported" at line 44, column 5] - Reached through: #local checkLang = isLanguageSupporte... [in template "language-detection.ftl" in function "getAcceptLanguage" at line 67, column 13] - Reached through: #assign lang = getAcceptLanguage(false) [in template "Common.init" at line 58, column 9]
- miikka9 years agoMaven
Thanks ChiaraS
This specific error message is related to the same topic but applies only for anonymous users. And it's kind of expected as not all languages coming in browser settings are supported. But we can improve the logic so there won't be error messages like this in the log.
Unfortunately the problem we have is related to authenticated users and that bit of code is not executed for them.
Cheers,
.M
- ChiaraS9 years agoLithium Alumni (Retired)
I see... I would try to use the user.id instead of self and use restadmin to see if it makes a difference:
<#assign update_lang_setting = restadmin("/users/id/${user.id?c}/profiles/name/language/set?value=${language}") />
- miikka9 years agoMaven
Just tried this but looks like it makes no difference unfortunately. The weird thing is that we haven't touched this code in months and it suddenly started to cause issues. But will keep on troubleshooting :smileyhappy:
Related Content
- 3 months ago
- 2 years ago