Logon failure when set_language fails #243

Closed
mmzeeman opened this Issue Oct 27, 2011 · 4 comments

Comments

Projects
None yet
2 participants
Owner

mmzeeman commented Oct 27, 2011

set_language can fail with a function clause exception when the language it tries to set is not found in the language list..

It should probably set the language to the default language when it is out of options.

When this happens, admin can no longer log into the site.

This error was triggered because of an inconsistancy in the language availabily list.

A language was editted the iso language code was changed from "sv_se" to "sv". Later on the site tried to use "sv_se" as key. Also after restarting.

Then it is called in this way, which leads to the function clause exception.

DEBUG: mod_translation:200 {"sv_se",
[{de,[{language,<<"Deutsch">>},
{is_enabled,true}]},
{en,[{language,<<"English">>},
{is_enabled,true}]},
{es,[{language,<<"Español">>},
{is_enabled,true}]},
{fr,[{is_enabled,true},
{language,<<"Français">>}]},
{nl,[{is_enabled,true},
{language,<<"Nederlands">>}]},
{sv,[{language,<<"Svenska">>},
{is_enabled,true}]},
{tr,[{is_enabled,true},
{language,<<"Türkçe">>}]},
{zh_cn,[{language,<<228,184,173,229,155,189>>},
{is_enabled,true}]}]}

Owner

mworrell commented Oct 27, 2011

Maybe just don't set the language when it is missing?

(At least in this case...)

Owner

mmzeeman commented Oct 27, 2011

Yes indeed.

Op 27 okt. 2011 om 12:23 heeft Marc Worrell reply@reply.github.com het volgende geschreven:

Maybe just don't set the language when it is missing?

(At least in this case...)

Reply to this email directly or view it on GitHub:
#243 (comment)

Owner

mworrell commented Feb 16, 2015

Is this still an issue?

Owner

mworrell commented Feb 16, 2015

Closing for now.

mworrell closed this Feb 16, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment