You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After I upgraded to K2 v2.10.3 when i searched for the article Configure OpenWRT on a BT Home Hub 5 / Plusnet One Router as a Secure WiFi Client it found the article with the link. (p.s. just search for Secure WiFi Client)
But when I click on the link I am redirected to that page but I am showing the content from the article Bios Limitations which has an article ID of 2.
If you look in the first link you can see that the hardware category also has an ID of 2. So I presumed that there was a (int) typecasting going on.
Router
My attention has now turned to the router.php as I have check those articles are correctly present and were working in the previous version of K2.
In settings the option Use the category ID in the URL was enabled
but if you referer back to the first URL the parent category is shown without an ID on the slug.
in the component router this line is responsible for stripping the item ID form the slug
if this is replaced with the following code it seems to fix routing
$slug = $segments[0];
Further notes
The router slugs between the modes of Use the category ID in the URL are not the same if you ignore the category ID aspect
Cat ID On: https://localhost/platforms/joomla3/kb/articles/25-dsl-broadband/configure-openwrt-on-a-bt-home-hub-5-plusnet-one-router-as-a-secure-wifi-client
CatID Off: https://localhost/platforms/joomla3/kb/articles/kb/hardware/dsl-broadband/configure-openwrt-on-a-bt-home-hub-5-plusnet-one-router-as-a-secure-wifi-client
Will be a new router in K2 for Joomla 4, if not I might need to rework this one?
The text was updated successfully, but these errors were encountered:
shoulders
changed the title
Use the category ID in the URL - is not honoured
Use the category ID in the URL - is not honoured and breaks routing
Jan 16, 2022
Joomla: 3.10.4
K2: 2.10.3
How I found this.
After I upgraded to K2 v2.10.3 when i searched for the article Configure OpenWRT on a BT Home Hub 5 / Plusnet One Router as a Secure WiFi Client it found the article with the link. (p.s. just search for Secure WiFi Client)
https://quantumwarp.com/kb/articles/37-kb/2-hardware/dsl-broadband/950-configure-openwrt-on-a-bt-home-hub-5-plusnet-one-router-as-a-secure-wifi-client
But when I click on the link I am redirected to that page but I am showing the content from the article Bios Limitations which has an article ID of 2.
If you look in the first link you can see that the hardware category also has an ID of 2. So I presumed that there was a (int) typecasting going on.
Router
My attention has now turned to the router.php as I have check those articles are correctly present and were working in the previous version of K2.
In settings the option Use the category ID in the URL was enabled
but if you referer back to the first URL the parent category is shown without an ID on the slug.
in the component router this line is responsible for stripping the item ID form the slug
k2/components/com_k2/router.php
Line 133 in 2f47c2a
if this is replaced with the following code it seems to fix routing
Further notes
The router slugs between the modes of Use the category ID in the URL are not the same if you ignore the category ID aspect
Will be a new router in K2 for Joomla 4, if not I might need to rework this one?
The text was updated successfully, but these errors were encountered: