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
[5.2] Allow access of default language home with "Remove lang code" parameter #43228
base: 5.2-dev
Are you sure you want to change the base?
[5.2] Allow access of default language home with "Remove lang code" parameter #43228
Conversation
This does exactly what it says. However a negative side effect is that if you click on the site logo to get to the home page you will always go to the home page of the default language and not the home page pf the current language which is the existing behaviour and I would assume that is what you would want. |
I have tested this item 🔴 unsuccessfully on eae25dd This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43228. |
This pr also breaks the error page. switch to the non default language |
Well that's the key question here. Is the existing behavior a bug or a feature. Depending on the usecase they both have pros and cons. |
If you click on a button that says "home" then I would expect it to take it to the home page of the language in use. It would be very annoying if everytime you clicked home you had to change the language again. I recall that @infograf768 has spent a lot of time over the years ensuring that the site logo goes to the correct homepage. This is the way it has always behaved. |
if you remove the language prefix from the url you can't directly switch to the default language anymore right? using the removed language part behavior is a strange idea anyway but if people like to use it they have to use the right way to link to the Startpage. just my opinion |
wrong |
You can switch the language by using either the prefixed URL or the lang=FOOBAR query parameter. However the current experience is inconsistent: depending on your session/cookie state, the same request ("GET /") will either return content or return a redirect. From an end-users perspective that's hardly understandable. |
This pull request has been automatically rebased to 5.2-dev. |
I know of course that you can add the ?lang= parameter... what I mean was it's not longer possible to change the language in a sef way. |
Summary of Changes
This PR suppresses the currently enforce dredirect to the language stored in the session (or language cookie) if the "/" page is called on a mulitlingual site with the "remove URL lang code"-parameter being enabled.
Testing Instructions
Actual result BEFORE applying this Pull Request
In step 6 of the instructions above, a redirect to the homepage of the non-default language is triggered
Expected result AFTER applying this Pull Request
In step 6 of the instructions above, the home page of the default language is opened.