Spin-off from #2405943-31: User entity validation misses form validation logic and #2227381-48: Apply formatters and widgets to User base fields 'name' and 'email':
Problem/Motivation
$user_preferred_langcode = $register ? $language_interface->getId() : $account->getPreferredLangcode();
$user_preferred_admin_langcode = $register ? $language_interface->getId() : $account->getPreferredAdminLangcode(FALSE);
The form has hard-coded defaults for the language fields here, which in case of the preferred admin langcode does not match the field definition default value (did not check the other one). The form should respect the default values of the fields though. I'm not sure which default value is the right one though.
Note that #2227381: Apply formatters and widgets to User base fields 'name' and 'email' would probably address the problem also, but I guess the right default value could need some discussion as well.
Comments
Comment #1
fagoComment #2
fagoComment #3
fagoComment #4
Gábor HojtsyUsers have 3 languages, an entity language (used for field translation, etc), a preferred language and an admin preferred language. I think it would be incorrect to have a site global user preferred language default and that we can safely assume that whatever interface the user registered with (or the user got registered with) will be more appropriate. AFAIS.
Comment #15
catchMoving this to a task since it feels like an implementation change rather than a mistake, and 'needs more info' - seems like it might be by design?
Comment #18
smustgrave CreditAttribution: smustgrave at Mobomo commentedIf still an issue please reopen with steps to reproduce per #15