User tests: Successful: Unsuccessful:
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.
In step 6 of the instructions above, a redirect to the homepage of the non-default language is triggered
In step 6 of the instructions above, the home page of the default language is opened.
Status | New | ⇒ | Pending |
Category | ⇒ | Front End Plugins |
I have tested this item ? unsuccessfully on eae25dd
This pr also breaks the error page.
switch to the non default language
go to a fake url to trigger the error page
click on the button to take you to the home page (see image)
with this pr you go to the home page of the default language not the home page of the current language which is a change in beahviour and one that I assume is undesired
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.
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?
if you want to go to the "homepage" (default menu item) you should direct to this item and should be the correct language 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
if you remove the language prefix from the url you can't directly switch to the default language anymore right?
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.
Title |
|
Thank you for this PR. I would like to see some bigger changes in here, because the parse rule is very dirty right now. You can't execute it more than once, since it might trigger redirects, which you wouldn't want. If we touch this, I'd like to see the parse rule cleaned up to not have any side effects. The parse rule should only parse what language should be used and everything else (setting cookies, doing redirects, whatever) should happen in the onAfterRoute event. (Yes, I know that we can't run parse more than once in Joomla anyway right now due to other circumstances, but we have to start somewhere. ? )
This pull request has been automatically rebased to 5.3-dev.
Title |
|
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.