[4.3] Fixing Itemid lookup in tags router in multilang#40474
[4.3] Fixing Itemid lookup in tags router in multilang#40474obuisard merged 16 commits intojoomla:4.3-devfrom
Conversation
|
Does this PR conflict somehow with PR #40455 ? Or would they work together? |
|
This PR does not conflict with #40455 |
|
I have tested this item ✅ successfully on 73cc2ca With published menu item /component/ not present in either case no itemid This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40474. |
|
I have tested this item ✅ successfully on 18d024d This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40474. |
|
I have tested this item 🔴 unsuccessfully on 18d024d with Tagged content Language Menu en-GB with Tags 'Millions' 'Love', tagged-content within 'Millions' and 'Love' (tagged in Menu) after Joomla 4.3.0 - component and itemid after applying Patch 40474 - itemid gone but still with component This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40474. |
|
@Hackwar Shouldn't the joomla-cms/components/com_tags/src/Service/Router.php Lines 131 to 138 in 18d024d |
|
Indeed, that needs to be changed. |
|
done |
|
Martin @MacJoom can you double-check if that fixes it? |
|
Will this PR render #40460 obsolete? |
They both produce identical result, however I think Hannes know Joomla Routing better than me, so I have closed mine. |
|
There is unfortunatly exactly the same result as before - being on f2240e5 - i can switch to the 4.2.9 branch with the same db and i have the original result. |
|
Btw. The testing instructions above are missing the step to setup a menu item with the tagged items in en-gb between steps 5 and 6 (on my test site the menu item has the alias 'tagged-content' as the links for 4.2.9 show) and if this menu item is set to language 'all' the links will stay on 'component' - this may be a clue. |
|
To be more clear, the issue here is that if you create a menu item to link to Tagged Items menu item type and select two tags A and B :
There was changed to the logic of code to find active menu item for a tag for some reasons. Unless the tagged items menu item type only select a single tag, it won't be used for link to a tag like before. |
|
Doing testing and getting same results as Martin @MacJoom. |
|
Indeed, the lookup was changed, since the old code was unable to find menu items with more than one tag assigned to them. So if you created a URL with 2 tags, it couldn't find a menu item at all. Fixing that now results in menu items with multiple tags not matching to URLs with a single tag. I personally think that tags are a filter on the content and those filters compound, so a URL with two tags should only display the content which has both tags assigned to it, but apparently I'm wrong there, since the tagging code doesn't behave that way later on in the model. I will change the code to match it again. |
|
Done. |
|
I have tested this item ✅ successfully on 6e3e4c3 Tags that are associated to menu items are properly opening in that menu item (use of the alias of the menu item), Behavior is consistent to 4.2, no longer dimmed as b/c as far as I can tell. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40474. |
|
@joeforjoomla Can you please answer @richard67 and me? This is a rather important issue and we are all waiting for you to either substantiate your claim or to merge this PR to be ready in time for 4.3.2. If you don't respond in 3 days, I will suggest to ignore your report. |
|
@Hackwar @richard67 i would expect to have tag links as before: http://joomla4/en/menualias/tag/tag1.html and not for all tags: http://joomla4/en/menualias.html Why this? How to have a tag link then? What is the sense of this router? |
|
I reviewed the whole code of tags again and you are right @joeforjoomla. I'm going to see what I can do here. |
|
Back to pending in the issue tracker. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40474. |
|
@joeforjoomla Please check if this change fixes your issues. |
@Hackwar Just perfect! :) |
|
I have tested this item ✅ successfully on d5a6863 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40474. |
|
I have tested this item ✅ successfully on d5a6863 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40474. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40474. |
|
Thank you Hannes @Hackwar and all testers, your help is greatly appreciated. Great team work. |
Pull Request for Issue #40454.
Summary of Changes
When running in multilanguage mode, the router falsely only checked for the current language or the default language, not for all (
*) language when looking up the right Itemid. This executes the logic twice, once for the current language, once for the*language. It exits for the first matched menu item.Testing Instructions
Actual result BEFORE applying this Pull Request
URLs start with /component/tags/...
Expected result AFTER applying this Pull Request
URLs have different menu items. None start with /component/tags
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