Trying to manage the Itemid inside a generic component router is no more possible. Indeed the buildSefRoute function of the SiteRouter has been modified so that the menu item is instantiated BEFORE the component router is executed, instead of AFTER has always been.
Routing system still works for extensions managing the Itemid inside the component router 'build' method and extending the RouterBase class
Menu alias is no more resolved being the component router executed AFTER the buildSefRoute get an instance of the current menu based on the current $query['Itemid']
Links are no more:
www.mysite.com/menualias/element
but:
www.mysite.com/component/mycomponent/element?Itemid=1111
Joomla 4.0
Labels |
Added:
?
|
Category | ⇒ | Router / SEF |
Why nobody says nothing?
I guess because nothing is written in stone.
Considering that the preprocess method has been a part of Joomla since 3.3, it isn't exactly new... And as @infograf768 wrote, 4.0 has not been released yet, so I wouldn't call it a big problem that the docs are not complete yet.
Status | New | ⇒ | Discussion |
Labels |
Added:
J4 Issue
|
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-08-18 18:54:50 |
Closed_By | ⇒ | wilsonge |
I've added a docs required tag to the original PR (i'm slowly working by way through all those tags and puttings them into the J4 upgrade docs/relevant other docs). Closing this issue as a result
That is not a regression. First of all, Joomla 4.0 does allow breaks in backwards compatibility. Second of all, you are supposed to modify the Itemid of your component in the preprocess method of your router. Simply said, the explanation of @csthomas is right here (In #18924)