Pending

User tests: Successful: Unsuccessful:

avatar SniperSister
SniperSister
7 Apr 2024

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

  1. configure a multilingual site
  2. configure the languagefilter plugin like this:
    • Language Selection for new Visitors: "site language"
    • Remove URL Language Code: "Yes"
  3. open a "private mode" browser window to ensure that you visit the site frontend without an existing session
  4. open the "/" URL of the site -> the default language will be used
  5. switch to the non-default language
  6. open the "/" URL of the site -> a redirect to the homepage of the non-default language is triggered

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.

avatar SniperSister SniperSister - open - 7 Apr 2024
avatar SniperSister SniperSister - change - 7 Apr 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 7 Apr 2024
Category Front End Plugins
avatar brianteeman
brianteeman - comment - 7 Apr 2024

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.

avatar brianteeman brianteeman - test_item - 7 Apr 2024 - Tested unsuccessfully
avatar brianteeman
brianteeman - comment - 7 Apr 2024

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.

avatar brianteeman
brianteeman - comment - 7 Apr 2024

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

image

avatar SniperSister
SniperSister - comment - 7 Apr 2024

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.

avatar brianteeman
brianteeman - comment - 7 Apr 2024

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.

avatar HLeithner
HLeithner - comment - 24 Apr 2024

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

avatar brianteeman
brianteeman - comment - 24 Apr 2024

if you remove the language prefix from the url you can't directly switch to the default language anymore right?

wrong

avatar SniperSister
SniperSister - comment - 24 Apr 2024

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.

avatar HLeithner
HLeithner - comment - 24 Apr 2024

This pull request has been automatically rebased to 5.2-dev.

avatar HLeithner
HLeithner - comment - 24 Apr 2024

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.

avatar HLeithner HLeithner - change - 24 Apr 2024
Title
[5.1] Allow access of default language home with "Remove lang code" parameter
[5.2] Allow access of default language home with "Remove lang code" parameter
avatar HLeithner HLeithner - edited - 24 Apr 2024

Add a Comment

Login with GitHub to post a comment