No Code Attached Yet
avatar xillibit
xillibit
2 Jan 2022

Steps to reproduce the issue

With Kunena 6.0 on some part on component the url parsed by Joomla! router replace the itemid by a wrong one. The itemid 101 is the home menu in mainmenu

image

At this point https://github.com/Kunena/Kunena-Forum/blob/K6.0/src/libraries/kunena/src/Route/KunenaRoute.php#L760 the itemid is correct :

C:\Users\xillibit\git\Kunena-forum-6.0\src\libraries\kunena\src\Route\KunenaRoute.php:758: object(Joomla\CMS\Uri\Uri)[2666] protected 'uri' => string 'index.php?option=com_kunena&view=topic&layout=create&catid=3' (length=60) protected 'scheme' => null protected 'host' => null protected 'port' => null protected 'user' => null protected 'pass' => null protected 'path' => string 'index.php' (length=9) protected 'query' => null protected 'fragment' => null protected 'vars' => array (size=5) 'option' => string 'com_kunena' (length=10) 'view' => string 'topic' (length=5) 'layout' => string 'create' (length=6) 'catid' => string '3' (length=1) 'Itemid' => int 191

At this point the itemid has been changed by a wrong one : https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/src/Router/Router.php#L195

C:\Users\xillibit\git\joomla-cms-40-dev\libraries\src\Router\Router.php:195: object(Joomla\CMS\Uri\Uri)[2679] protected 'uri' => string 'index.php?option=com_kunena&view=topic&layout=create&catid=3&Itemid=191' (length=71) protected 'scheme' => null protected 'host' => null protected 'port' => null protected 'user' => null protected 'pass' => null protected 'path' => string 'index.php' (length=9) protected 'query' => null protected 'fragment' => null protected 'vars' => array (size=5) 'option' => string 'com_kunena' (length=10) 'view' => string 'topic' (length=5) 'layout' => string 'create' (length=6) 'catid' => string '3' (length=1) 'Itemid' => int 101

Expected result

The url parsed by Joomla! router should keep the itemid of active menu : /index.php?option=com_kunena&view=topic&catid=3&id=14270&Itemid=191

Actual result

The url parsed by Joomla! router replace the itemid by the one from home menu /index.php?option=com_kunena&view=topic&catid=3&id=14270&Itemid=101

System information (as much as possible)

Joomla4.0.6-dev

Additional comments

avatar xillibit xillibit - open - 2 Jan 2022
avatar joomla-cms-bot joomla-cms-bot - change - 2 Jan 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 2 Jan 2022
avatar xillibit xillibit - change - 2 Jan 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-01-02 18:29:21
Closed_By xillibit
avatar xillibit xillibit - close - 2 Jan 2022
avatar xillibit
xillibit - comment - 2 Jan 2022

Finally i have just found a way to fix with the followwing change into Kunena /src/Service/Router.php : Kunena/Kunena-Forum@c137c6a

Add a Comment

Login with GitHub to post a comment