Kunena 6.3.0 released

The Kunena team has announce the arrival of Kunena 6.3.0 [K 6.3.0] in stable which is now available for download as a native Joomla extension for J! 4.4.x/5.0.x/5.1.x. This version addresses most of the issues that were discovered in K 6.2 and issues discovered during the last development stages of K 6.3

Please note: The Kunena project team takes NO responsibility for maintaining nor supporting anything in this category.

Bug Joomla Menu path not used

More
10 years 7 months ago #1 by tantalus
Hi,

when I have a Joomla menu item that shows a Kunena category, that menu item is no more selected when i choose some topic within that category.

Is this wanted behaviour?
In Joomla itself, a menu item linking to a category stays active when loading some content within.

You can test this very easy:
- Install a Joomla with sample data.
- Install Kunena with sample data.
- In the menu "main menu", create a "Show Category" menu item "a" that shows the category "Welcome Mat".
- In the frontend, select the item "a", then "Welcome to Kunena!". "a" is no more active.

This happens because Kunena sets Itemid=0. Having a look at KunenaRoute::_, i see a
Code:
if (!$uri->getVar('Itemid')) { self::setItemID ( $uri ); }
That function seems to iterate through the menu items but does find nothing and returns 0. When if comment out the above "if", the "a" stays active, even though there is no Itemid. I think this is because the menu link "a" is a subset of the "Welcome to Kunena!" link.

Please Log in or Create an account to join the conversation.

More
10 years 7 months ago #2 by tantalus
Replied by tantalus on topic Joomla Menu path not used
As it turns out, it was the last function in the KunenaRoute class.
It only accepts items as parents whose query parts (option, view, Itemid, ...) are _all_ the same as the link to generate.

The topic links in the category have all view=topic. But my menu link has view=category, of course.

I changed the
Code:
if ($value != $uri->getVar($var)) {
into
Code:
if ($value != $uri->getVar($var) && $var !== 'view') {
in line 560 of libraries/kunena/route/route.php. Bad hack, but works for me :).

Please Log in or Create an account to join the conversation.

More
10 years 3 months ago #3 by mecenat
Replied by mecenat on topic Joomla Menu path not used
best custom writed hack i seen for kunena B)

Please Log in or Create an account to join the conversation.

More
10 years 3 months ago #4 by xillibit
Replied by xillibit on topic Joomla Menu path not used

tantalus wrote: As it turns out, it was the last function in the KunenaRoute class.
It only accepts items as parents whose query parts (option, view, Itemid, ...) are _all_ the same as the link to generate.

The topic links in the category have all view=topic. But my menu link has view=category, of course.

I changed the

Code:
if ($value != $uri->getVar($var)) {
into
Code:
if ($value != $uri->getVar($var) && $var !== 'view') {
in line 560 of libraries/kunena/route/route.php. Bad hack, but works for me :).

In Kunena 3.0.4 this part has changed so you can't aplly anymore this hack

I don't provide support by PM, because this can be useful for someone else.

Please Log in or Create an account to join the conversation.

Time to create page: 0.489 seconds