jDownloads Support Forum

jDownloads for Joomla 4.x and 5.x => jDownloads 4.0 => Bugs! => Topic started by: Elfangor93 on 16.08.2024 20:05:18

Title: Itemid missing in MenuItem->link parameter
Post by: Elfangor93 on 16.08.2024 20:05:18
I added a menuitem of type "List all categories" in my main menu. After looking at the url in the menu I see that the Itemid is missing. Therefore Joomla opens the corresponding view without taking into account the menuitem parameters.

I confirmed with the Joomla-Core Maintainer who developed the modern router that the Itemid has to be added to the url by the component router. Seems like JDownlods is not doing that, so the Joomla\CMS\Menu\MenuItem->link parameter in the menuitem object is wrongly set. This leads to multiple misbehaviors.

System:
Joomla v5.1.0
PHP v8.1.2
Title: Re: Itemid missing in MenuItem->link parameter
Post by: Elfangor93 on 16.08.2024 20:12:47
Additionally I get the following warnings ain the "List all categories" view pointing that there are some lines of code which are not properly evaluated.

Warning: Undefined array key 0 in \components\com_jdownloads\src\Helper\JDHelper.php on line 178

Warning: Attempt to read property "uploads_view_upload_icon" on null in \components\com_jdownloads\src\View\Category\HtmlView.php on line 109

Warning: Attempt to read property "uploads_view_upload_icon" on null in \components\com_jdownloads\tmpl\category\default.php on line 264

Warning: Attempt to read property "view_report_form" on null in \components\com_jdownloads\tmpl\category\default.php on line 1013
Title: Modern menu links
Post by: ColinM on 17.08.2024 11:01:28
Hi
At the present time jD does not support what are refered to as 'modern' links.
If you attempt to use them then it will go wrong as you have found.

If you look in jD Options - Frontend tab -URL Routing you will see it is disabled.

Colin
Title: Re: Itemid missing in MenuItem->link parameter
Post by: Elfangor93 on 19.08.2024 08:21:21
Hi,
Thank you for the fast reply. As this missing Itemid does not have negative impacts when the menu is created using the Menu Module (mod_menu), I found a work around which is solving the problem. If the menulinks are generated in the template using the Joomla\Module\Menu\Site\Helper\MenuHelper::getList(), the missing Itemid is added manually and the negative impacts are gone.
Just for everyone else having this problem in the future...
Regrads
Manuel