User tests: Successful: Unsuccessful:
It is better to provide slug to the category router in TagsHelperRoute::getItemRoute.
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
Category | ⇒ | Router / SEF |
Labels |
Added:
?
|
I recently implemented tags in my extension User Ideas. You can install the extension and use it for testing.
Just create a tag for a category and open the link of that tag.
In my case, I had to implement additional code in my router to provide slug.
I had to write the code from line 84 to line 91.
components/com_userideas/router.php
If you comment that code, you will be able to see the result without category slug on the page that lists.
So, it is better to provide slug to category router. It will not be necessary to execute query to generate a slug when I need it. That will save additional DB queries.
Furthermore, it will be better to use category slug and item slug everywhere. Are there any reason category slug has not been used in the method getItemRoute?
Labels |
Removed:
?
|
I have tested this item
Installed the User Idea component. Applying the patch saves a query on page load.
@ITPrism If you take a look in ContactHelperRoute::ContactHelperRoute for example, the first param "catid" is considered as an integer. I did not tested it, but i think if we apply you PR, there will be a string to integer conversion which will lead to errors. Other classes like ContentHelperRoute, NewsfeedsHelperRoute and JHelperRoute may be affected by this change also. Am i wrong ?
@ITPrism can you please have a Look like @marrouchi mentioned?
closing, can't see the benefit for the core and a slug will not be used because only the id is used in getCategoryRoute
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-05-24 10:04:53 |
Closed_By | ⇒ | rdeutz |
Category | Router / SEF | ⇒ | com_tags Front End Router / SEF |
how can the change be tested? Thanks.
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8294.