-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4.3] Rewriting com_tags router #39114
Conversation
Setting the release blocker label as inherited from issue #39105 . |
I have tested this item ✅ successfully on 8f23f4f This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39114. |
Test on a fresh installation (4.3 dev) with testing sample data and additional own data, not multilingual on localhost (sef urls on but no rewrite rule). Could not replicate before applying the patch (successful per se) Could not replicate: Additional URL parameter v2 (#37492) Successful Looks good for me but recommend testing with multilingual sites. No documentation change needed. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39114. |
I have tested this item ✅ successfully on a3cd27e This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39114. |
I've restored @jamfx 's test result since all changes after it were not really functional. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39114. |
Thank you Hannes @Hackwar for this much needed PR! |
J4.3.0 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39114. |
Confirmed. The new router has broken routing adding ?Itemid=xxx to all links despite the menu item created. |
I am unsure whether I should open an issue for it or just a comment, but when:
Then tag URL are not rewritten from Is this the correct behavior? |
We have a PR that for fixing broken behavior of Tag router #40474. Please test, and report your result there. Thanks. |
Pull Request for Issues #39105, #38996, #35382, #13598, #37444, #37492.
Summary of Changes
This PR rewrites the router of com_tags. Above you can see a whole list of issues which this should fix. Since these are very different issues, please don't close the issues right away without first testing this if it really fixes the issue.
This router improves a lot of things, but it also still is not perfect. While this better matches existing menu items, removes unnecessary URL parameters, allows for multiple tags per URL and fixes bugs in pagination and a few other areas, this still does not properly support language and multilanguage setups. It also fails to properly support nested tags.
The routes of the new router should be pretty much identical to the existing ones, except for where the current URLs aren't actually working. Right now the router can generate and parse URLs with several tags in one URL, where the IDs of the tags are handed over as an array in the non-SEF URL and a SEFed URL will have the aliases of those tags concatenated as segments of the URL.
Stuff not solved by this PR
The multilanguage issues are serious and I would love to solve them, but those fixes would build upon these changes here and these changes then again are already complex enough to test, so I'd like to first merge this here and then fix the language issues in another PR, especially since that PR would require a lot of changes to the models of the component.
The nested tags issue in the end means a new feature. Right now you can set a tag to be a child of another tag. However, URLs to a tag only contain the alias, not the complete path of the tag. This would be problematic when 2 child tags of different parents have the same alias. There is also no visual representation of this structure. My proposal would be to introduce an option to switch between the ability to select more than one tag per URL by using /tags/[tag1]/[tag2]/... or selecting a single, nested tag by using /tags/[tag1-level1]/[tag1-level2]/...
Another new feature could be to add a plus sign to tags in order to further filter a list of items down by adding yet another tag to that filter. Right now several tags in a menu item don't mean that only items with all tags associated to these items are shown, but all items which have at least one of those tags are displayed.
Testing Instructions
Pagination issue (fixes #35382 & #39105)
Additional URL parameter (fixes #38996)
Please go to #38996 and follow the instructions there to rebuild the issue. After applying this change, this should be fixed.
Use the right menu item for tags (fixes #13598)
Numeric tags don't work (fixes #37444)
Additional URL parameter v2 (#37492)
I can't reproduce this with this change applied. Can someone check if this is valid?
Improvements with these changes
index.php?option=com_tags&view=tag&id[0]=1:alias-1&id[1]=2:alias-2...
/[menu-item]/[tag-1]/[tag-2]/...
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
I don't know right now if we need documentation changes...