Locale change (Language selection) does not work first time for email link page with custom theme
#46.931 geöffnet am 6. März 2026
Repository-Metriken
- Stars
- (34.398 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 6T 19h) (384 gemergte PRs in 30 T)
Beschreibung
Before reporting an issue
- I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.
Area
login/ui
Describe the bug
When using a custom login theme (with only CSS overrides), the locale selector dropdown works but the selected language is not applied on the first-time selection when the page is opened through an email action link.
The page reloads after selecting a language from the dropdown, but the content remains in the previous language.
If the user selects the language again (second attempt by choosing same language), the language is applied correctly.
This behaviour is observed on pages opened via action-token email links, such as email verification.
Version
26.5.4
Regression
- The issue is a regression
Expected behavior
The language should change each time (including first time) when user select from language drop down.
Actual behavior
When first time user change language, the kc_locale is appended into the query param and request made to server but response contains older language content (not the one provided into kc_locale).
When user tries to change next time, it works well and content change in selected language.
How to Reproduce?
- Enable Internationalization in the realm.
- Configure a custom login theme extending the
baseparent theme. - Configure an Identity Provider (IdP) (e.g., Github).
- Configure First Broker Login flow with Verify Email enabled.
- Initiate login using the configured IdP.
- During the login process, Keycloak sends a verification email containing a login continuation link.
- Open the login link from the email. It will open verification page.
- Try changing language by using language drop-down
Anything else?
It seems the kc_locale send in request does not work first time.