joomla-cms icon indicating copy to clipboard operation
joomla-cms copied to clipboard

[6.0] Languagefilter: Refactoring of routing

Open Hackwar opened this issue 1 year ago • 14 comments

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

Hackwar avatar Jul 28 '24 14:07 Hackwar

Works. Thank you!

Slava287 avatar Aug 23 '24 19:08 Slava287

@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.

brianteeman avatar Aug 23 '24 21:08 brianteeman

I have tested this item :white_check_mark: successfully on 3f9a0c557474454b3a912bbf99fe44124226698d

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 avatar Aug 23 '24 21:08 Slava287

Ok


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

Slava287 avatar Aug 23 '24 21:08 Slava287

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.

Hackwar avatar Aug 24 '24 08:08 Hackwar

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

Slava287 avatar Aug 24 '24 11:08 Slava287

Now the URLs should all be generated correctly.

Hackwar avatar Nov 21 '24 21:11 Hackwar

Yes, everything is fine! Thank you!

Slava287 avatar Jan 24 '25 07:01 Slava287

Work

@Slava287 Does that mean you have tested this pull request (PR) here with success on a 5.3-dev branch or a 5.3 nightly build? Of sp, please go to the issue tracker here https://issues.joomla.org/tracker/joomla-cms/43858 and use the blue "Test this" button at the top left corner to mark your test result. Thanks in advance.

richard67 avatar Jan 24 '25 08:01 richard67

I can't open something: https://artifacts.joomla.org/drone/joomla/joomla-cms/5.3-dev/43858/downloads/80499# Your title here...


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

Slava287 avatar Jan 25 '25 08:01 Slava287

I can't open something: https://artifacts.joomla.org/drone/joomla/joomla-cms/5.3-dev/43858/downloads/80499# Your title here...

@Slava287 Use https://artifacts.joomla.org/drone/joomla/joomla-cms/5.3-dev/43858/downloads/81640/ .

richard67 avatar Jan 25 '25 12:01 richard67

I have tested this item :white_check_mark: successfully on ba0881e8e8694f880b0a9dceaf99139b793d78db

Thank you, everything works!


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

Slava287 avatar Jan 26 '25 11:01 Slava287

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

HLeithner avatar Mar 04 '25 17:03 HLeithner

I have tested this item :red_circle: unsuccessfully on 22e4bd1f1691445437a7787311ff5202148a96c1

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.

exlemor avatar Jun 17 '25 23:06 exlemor

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!

Hackwar avatar Jun 23 '25 07:06 Hackwar

I have tested this item :white_check_mark: successfully on 99eb3e85882f606a29a99169278c316ea3fea1a0

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.

exlemor avatar Jun 26 '25 00:06 exlemor

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

Is that still the case?

brianteeman avatar Aug 04 '25 14:08 brianteeman

Nope, this PR is ready.

Hackwar avatar Aug 04 '25 15:08 Hackwar

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

brianteeman avatar Aug 04 '25 15:08 brianteeman

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.

richard67 avatar Aug 04 '25 16:08 richard67

I have tested this item :white_check_mark: successfully on 5fb473372dccc6f8df982cb0a7f9e913df0b0899

Tested with French language pack


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

sdwjoomla avatar Aug 16 '25 15:08 sdwjoomla

RTC


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

richard67 avatar Aug 16 '25 16:08 richard67

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

Bodge-IT avatar Aug 16 '25 16:08 Bodge-IT