? Pending

User tests: Successful: Unsuccessful:

avatar ITPrism
ITPrism
6 Nov 2015

It is better to provide slug to the category router in TagsHelperRoute::getItemRoute.

avatar ITPrism ITPrism - open - 6 Nov 2015
avatar ITPrism ITPrism - change - 6 Nov 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 6 Nov 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 7 Nov 2015
Category Router / SEF
avatar zero-24 zero-24 - change - 7 Nov 2015
Labels Added: ?
avatar zero-24
zero-24 - comment - 7 Nov 2015

how can the change be tested? Thanks.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8294.

avatar ITPrism
ITPrism - comment - 16 Nov 2015

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?

without_category_slug

avatar brianteeman brianteeman - change - 29 Jan 2016
Labels Removed: ?
avatar euismod2336 euismod2336 - test_item - 4 Nov 2016 - Tested successfully
avatar euismod2336
euismod2336 - comment - 4 Nov 2016

I have tested this item successfully on d69de0e

Installed the User Idea component. Applying the patch saves a query on page load.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/8294.

avatar marrouchi
marrouchi - comment - 24 Jan 2017

@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 ?

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 11 Mar 2017

@ITPrism can you please have a Look like @marrouchi mentioned?

avatar rdeutz
rdeutz - comment - 24 May 2017

closing, can't see the benefit for the core and a slug will not be used because only the id is used in getCategoryRoute

avatar rdeutz rdeutz - change - 24 May 2017
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2017-05-24 10:04:53
Closed_By rdeutz
avatar rdeutz rdeutz - close - 24 May 2017
avatar joomla-cms-bot joomla-cms-bot - change - 24 May 2017
Category Router / SEF com_tags Front End Router / SEF

Add a Comment

Login with GitHub to post a comment