joomla-cms
joomla-cms copied to clipboard
[6.0] Languagefilter: Refactoring of routing
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
Works. Thank you!
@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.
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.
Ok
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43858.
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.
Hello. Indeed, I didn’t notice it right away
Now the URLs should all be generated correctly.
Yes, everything is fine! Thank you!
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.
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.
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/ .
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.
This pull request has been automatically rebased to 6.0-dev.
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.
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!
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.
Right now this PR is a Proof Of Concept and is NOT ready.
Is that still the case?
Nope, this PR is ready.
Can you update the post then - otherwise people wont test it
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.
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.
RTC
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43858.
Thanks @Hackwar for the change and thanks @exlemor & @sdwjoomla for tests.