Skip to content

Conversation

@Hackwar
Copy link
Member

@Hackwar Hackwar commented Jul 28, 2024

Pull Request for issue #24315, #25449, #39181

Summary of Changes

This is a refactoring of the routing component of the languagefilter plugin. The goal are as follows:

  • Allow to parse URLs more than once. Right now the parseing of the languagefilter plugin sets a lot of state and even does redirects.
  • When the prefix of the default language is set to be removed, the redirect for the language switch is removed.
  • Make the code simpler and more reliable.

Right now this PR is a Proof Of Concept and is NOT ready. This is to collect feedback from the community and other developers.

Testing Instructions

Setup different multilanguage sites and apply the patch. The default behavior should not change, except that when the default prefix is removed, you can switch the language without an additional redirect.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@Fedik Fedik added the Feature label Jul 29, 2024
@Slava287
Copy link

Works. Thank you!

@brianteeman
Copy link
Contributor

@Slava287 Please go to the issue tracker here https://issues.joomla.org/tracker/joomla-cms/43858 and mark your test result by using the blue "Test this" button at the top left corner, selecting your test result and finally submit, so that your test is properly counted. Just a comment here is not enough. Thanks in advance.

@Slava287
Copy link

I have tested this item ✅ successfully on 3f9a0c5

Everything works correctly. There are no errors. I also tested it on the latest version of Joomla! 5.1.3 Stable


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43858.

@Slava287
Copy link

Ok


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43858.

@Hackwar
Copy link
Member Author

Hackwar commented Aug 24, 2024

When suffix are enabled, this unfortunately right now creates URLs like /en.html. I still have to take a look what we have to do here.

@Slava287
Copy link

Hello. Indeed, I didn’t notice it right away

@Hackwar Hackwar changed the base branch from 5.2-dev to 5.3-dev August 28, 2024 11:40
@Hackwar Hackwar changed the title [5.2] Languagefilter: Refactoring of routing [5.3] Languagefilter: Refactoring of routing Aug 28, 2024
@Hackwar Hackwar removed the PR-5.2-dev label Sep 3, 2024
@Hackwar
Copy link
Member Author

Hackwar commented Nov 21, 2024

Now the URLs should all be generated correctly.

@exlemor exlemor moved this to Abandoned in PR Cleanup May 10, 2025
@MacJoom MacJoom moved this from Abandoned to To be tested in PR Cleanup May 10, 2025
@Bodge-IT Bodge-IT removed this from PR Cleanup Jun 12, 2025
@exlemor
Copy link

exlemor commented Jun 17, 2025

I have tested this item 🔴 unsuccessfully on 22e4bd1

I tested this unsuccessfully on Joomla ‎6.0.0-alpha2-dev (Nightly from June 17th) and sadly it crashes as soon as I turn the patch on with:

0 Call to a member function getInput() on null

Sorry, :( @Hackwar


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43858.

@Hackwar
Copy link
Member Author

Hackwar commented Jun 23, 2025

Seems like this was a merge conflict at some point. I fixed that. Thanks @exlemor! If you had time, could you test this again? @Slava287 if you have time to test this again as well, I would be very happy. Thank you!

@exlemor
Copy link

exlemor commented Jun 26, 2025

I have tested this item ✅ successfully on 99eb3e8

I have successfully tested this. Added language, removed it, checked articles associations, etc... Checked Front-end/Back-end.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43858.

@brianteeman
Copy link
Contributor

Right now this PR is a Proof Of Concept and is NOT ready.

Is that still the case?

@Hackwar
Copy link
Member Author

Hackwar commented Aug 4, 2025

Nope, this PR is ready.

@brianteeman
Copy link
Contributor

Can you update the post then - otherwise people wont test it

@richard67
Copy link
Member

Can you update the post then - otherwise people wont test it

@Hackwar I think it should be sufficient to remove the following 2 sentences from the description of this PR:

Right now this PR is a Proof Of Concept and is NOT ready. This is to collect feedback from the community and other developers.

@sdwjoomla
Copy link
Contributor

I have tested this item ✅ successfully on 5fb4733

Tested with French language pack


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43858.

@richard67
Copy link
Member

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43858.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Aug 16, 2025
@Bodge-IT Bodge-IT merged commit fe22ff2 into joomla:6.0-dev Aug 16, 2025
30 checks passed
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Aug 16, 2025
@Bodge-IT
Copy link
Contributor

Thanks @Hackwar for the change and thanks @exlemor & @sdwjoomla for tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.