This happens for sure on Joomla 4.2.9
index.php?option=com_content&view=article&id=1
The content of article ID 1 to be displayed when visiting the alias of the menu item, as the description of the menu item says An external or internal URL.
Throws a 404 error.
Joomla 4.2.9
PHP 8.0
Labels |
Added:
No Code Attached Yet
|
Labels |
Added:
bug
|
What happens if you use the absolute url, i.e. with the protocol and domain part? It will still be an internal url. An internal url can be given as absolute or as relative url, an external url has to be absolute.
I did attempt this during my testing, and it was the same result. I believe the problem lies somewhere in the parseSefRoute function in the SiteRouter, but I'm not fully sure just yet. I do know this functionality works fine on Joomla 3.
The url you have provided is not an SEF url, so why should the SEF router be the problem?
The URL we are pointing the menu item to isn't SEF, but the alias that should load it that is causing the 404 is an SEF url. You can visit the non-SEF link directly, but it's when you visit the alias that you receive a 404.
Save and visit menu item alias
It never worked.
"System Links -> URL" displays an URL that User store in menu options, not an alias.
The error you got it is expected behavior
It certainly 100% worked in Joomla 3.
hm, I see, interesting, it should not work :)
Could be because some code lost when routing code improved. Compare to Joomla 3 behavior, adding an elseif clause below after this line https://github.com/joomla/joomla-cms/blob/4.3-dev/libraries/src/Router/SiteRouter.php#L291 would solve the issue
elseif ($item = $this->menu->getActive())
{
$uri->setQuery(array_merge($uri->getQuery(true), $item->query));
}
What happens if you use the absolute url, i.e. with the protocol and domain part? It will still be an internal url. An internal url can be given as absolute or as relative url, an external url has to be absolute.