-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Frontend locale menu doesn't work on login form (Security) #689
Comments
it SHOULD work, but it works with the locale querystring argument, instead of the url prefix. I.e. This is due to If it's not doing that, then it should be fixed to do that. :D |
Here's the code in question. |
Sorry, you are right, it's probably that code in question failing on unsaved records. :) |
Yep, it's the generation of the locale menu items that has the issue. Default LocaleMenu.ss <ul>
<% loop $Locales %>
<li class="$LinkingMode">
<a href="$Link.ATT" <% if $LinkingMode != 'invalid' %>rel="alternate"
hreflang="$HrefLang"<% end_if %>>$Title.XML</a>
</li>
<% end_loop %>
</ul> Results in: From login screen. (once #688 is resolved) <ul>
<li class="current">
<a href="/Security/login?l=de_AT" rel="alternate"
hreflang="de-at">German</a>
</li>
<li class="link">
<a href="/Security/login?l=de_AT" rel="alternate"
hreflang="en-gb">English</a>
</li>
</ul> (Note that the "English" link has the incorrect "de_AT" query string argument, instead of "en_GB") |
Possible fix at #691 The issue is that RecordLocale doesn't tell "unsaved" records what it's locale is. We can clone and mock the query param for that object to force it. :) |
The locale menu (
LocaleMenu.ss
) doesn't appear to work when on the login form or password reset form (e.g.Security
).PR #688 fixes the issue with actions not being included in links, but there is a 2nd issue that results in the links for all Locales within the locale menu pointing to the "current" locale, instead of to the other relevant locale.
I believe the issue is
getRecordLocale()
(Link) is failing to obtain the relevant local when onSecurity
and is falling back togetCurrentLocale()
.But I can't get my head around how it could be resolved.
Fluent v5.0.0
PRs
The text was updated successfully, but these errors were encountered: