Steps to reproduce the issue
Itemid was supposed to be inherited from the current menu item - this is how it's always been as far as I remember (1.5.0) and what the SEF docs say.
- SEF turned off (doesn't matter, issue occurs regardless of SEF but it's easier to debug)
- Create an
Articles (com_content) menu item - doesn't matter which type
- Open
/components/com_content/content.php
- Replace it with the code:
var_dump(JRoute::_('index.php?option=com_content&view=test'));
var_dump(JRoute::_('index.php?view=test'));
die;
Expected result
string(63) "/j384/index.php?option=com_content&view=test&Itemid=121" string(63) "/j384/index.php?view=test&option=com_content&Itemid=121"
Actual result
string(48) "/j384/index.php?option=com_content&view=test" string(63) "/j384/index.php?view=test&option=com_content&Itemid=121"
System information (as much as possible)
3.8.4
Additional comments
This is a regression from #19099
If you replace libraries/src/Router/SiteRouter.php with the one from 3.8.3 everything works as it should.
If there's no option= in the URL, then the Itemid gets inherited correctly, but I don't think developers should have to rewrite all URLs because of this (what I consider to be...) B/C change.
Steps to reproduce the issue
Itemid was supposed to be inherited from the current menu item - this is how it's always been as far as I remember (1.5.0) and what the SEF docs say.
Articles(com_content) menu item - doesn't matter which type/components/com_content/content.phpExpected result
string(63) "/j384/index.php?option=com_content&view=test&Itemid=121" string(63) "/j384/index.php?view=test&option=com_content&Itemid=121"Actual result
string(48) "/j384/index.php?option=com_content&view=test" string(63) "/j384/index.php?view=test&option=com_content&Itemid=121"System information (as much as possible)
3.8.4
Additional comments
This is a regression from #19099
If you replace
libraries/src/Router/SiteRouter.phpwith the one from 3.8.3 everything works as it should.If there's no
option=in the URL, then theItemidgets inherited correctly, but I don't think developers should have to rewrite all URLs because of this (what I consider to be...) B/C change.