? Pending

User tests: Successful: Unsuccessful:

avatar csthomas
csthomas
17 Jul 2016

Pull Request for Issue #11163.

Summary of changes

  • Remove tag id from SEF URL, but it is B/C.
  • Treat (second menu item to view=tags if exists or) first menu item for tags as default menu item for tag view.

If tags list does not have any menu item then
replace
/component/tags/tag/123-mytag
to
/component/tags/mytag
/component/tags/tag/mytag

If we have menu item with /tags alias for tags view:
then PR replace
/tags/tag/123-mytag
to
/tags/mytag

If we have second menu item with alias="tag"
then:
replace
/tags/tag/123-mytag
to
/tag/mytag

but link to list of tags is:
/tags

Testing Instructions

Create a few tags and content with tags and test front end URLs.

Documentation Changes Required

I do not know but there is one thing that can surprise.

Tag route changes:

  1. First as usual we try to find menu item for a tag.
  2. If menu item for the tag does not exists then:
    • try to find second menu item for view=tags, (ex. tag/...)
    • if not exists then try to find first menu item for view=tags. (ex. tags/...)

Votes

# of Users Experiencing Issue
3/3
Average Importance Score
4.00

avatar csthomas csthomas - open - 17 Jul 2016
avatar csthomas csthomas - change - 17 Jul 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 17 Jul 2016
Labels Added: ?
avatar brianteeman brianteeman - change - 18 Jul 2016
Category Tags
avatar joomla-cms-bot joomla-cms-bot - change - 21 Jul 2016
Category Tags Tags Front End Components
avatar csthomas csthomas - change - 21 Jul 2016
Title
Remove id from tags, use tags list menu item as default for tag
Remove id from tags, use menu item of tags view as default for tag view
avatar csthomas csthomas - change - 21 Jul 2016
The description was changed
Title
Remove id from tags, use tags list menu item as default for tag
Remove id from tags, use menu item of tags view as default for tag view
avatar designbengel
designbengel - comment - 23 Jul 2016

I have following error in the com_patchtester: Could not connect to GitHub: No commit found for the ref tagroute2

avatar designbengel designbengel - test_item - 23 Jul 2016 - Tested unsuccessfully
avatar designbengel
designbengel - comment - 23 Jul 2016

I have tested this item ? unsuccessfully on 40b7c93

*In testing environment i have following tag-urls before the patch:
*

  • Red: index.php/tagged-items
  • Yellow: index.php/compact-tagged
  • Green index.php/component/tags/tag/4-green
  • Lime index.php/component/tags/tag/5-lime

after the patch:

avatar brianteeman
brianteeman - comment - 23 Jul 2016

@designbengel that looks perfect to me.

On 23 July 2016 at 13:17, designbengel notifications@github.com wrote:

I have tested this item ? unsuccessfully on 40b7c93
40b7c93

*
In testing environment i have following tag-urls before the patch: *

  • Red: index.php/tagged-items
  • Yellow: index.php/compact-tagged
  • Green index.php/component/tags/tag/4-green
  • Lime index.php/component/tags/tag/5-lime

after the patch:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#11166 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8eD5Za2GvniAJdAgTplfk1LLkrH6ks5qYfg0gaJpZM4JOSyf
.

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar csthomas
csthomas - comment - 23 Jul 2016

Lime: index.php/all-tags/lime Red and Yellow is still wrong
@designbengel What URL do you expected?
Can you write more details about your menu structure?

If you have menu item for "tagged" or "compact" tags then it takes precedence before "all-tags".

You can have some extra menu item like "/my-extra-featured-sponsored-tags" and it can not be replaced by default tags menu, which is menu item to list of all tags.

Of course you can set parent in menu item which may change it to:
/all-tags/my-extra-featured-sponsored-tags but I have not tested it and it is probably unusable.

avatar designbengel
designbengel - comment - 27 Jul 2016

Ok i thought it should be index.php/all-tags/red for the red and index.php/all-tags/yellow for the yellow. If it´s good so then i mark it as successful.

avatar csthomas
csthomas - comment - 27 Jul 2016

If you set menu item with alias "red" for tag 'red' and you want URL like /all-tags/red
then in the right side (menu item edit form, details):

  • change menu if you need and
  • select parent item (menu item from above menu) to "all-tags"
avatar csthomas
csthomas - comment - 28 Jul 2016

Ok i thought it should be index.php/all-tags/red for the red and index.php/all-tags/yellow for the yellow. If it´s good so then i mark it as successful.

Yes it is good.

avatar Bakual
Bakual - comment - 28 Jul 2016

If I read the code right, then this will no longer parse the old URLs correctly. Eg index.php/component/tags/tag/5-lime will result in a 404 because it expects a direct "alias" not "id-alias". Or do I miss something?

avatar csthomas
csthomas - comment - 28 Jul 2016

Eg index.php/component/tags/tag/5-lime will result in a 404 because it expects a direct "alias" not "id-alias"

It will work correctly.

[UPDATED]

You mentioned about fixSegment method which only add a prefix id if find row.

For index.php/component/tags/tag/5-lime if fixSegment method does not find a row then return $segment not changed, means return '5-lime'.

For index.php/component/tags/tag/lime if fixSegment method finds a row with id=5 then return '5-lime'

Both return the same '5-lime'.

avatar csthomas csthomas - change - 28 Jul 2016
Title
Remove id from tags, use menu item of tags view as default for tag view
Routing: Remove IDs from tags URLs, use menu item of tags view as default for tag view
avatar csthomas csthomas - change - 28 Jul 2016
Title
Remove id from tags, use menu item of tags view as default for tag view
Routing: Remove IDs from tags URLs, use menu item of tags view as default for tag view
avatar csthomas csthomas - edited - 28 Jul 2016
avatar hardiktailored hardiktailored - test_item - 30 Jul 2016 - Tested unsuccessfully
avatar hardiktailored
hardiktailored - comment - 30 Jul 2016

I have tested this item ? unsuccessfully on

After applying patch it removes the ID of tags but not replaces tags/tag/ with tags/ from the URL as you said in first place.
It works as you said for menu items. When menu item is present, tags/tag/ replaces with menu alias name.


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

avatar hardiktailored
hardiktailored - comment - 30 Jul 2016

See results:

Before applying patch and without menu item
screen shot 2016-07-30 at 02 41 46

After applying patch without menu item
screen shot 2016-07-30 at 02 42 19

After applying patch with menu item added
screen shot 2016-07-30 at 02 42 49


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

avatar Bakual
Bakual - comment - 30 Jul 2016

For index.php/component/tags/tag/5-lime if fixSegment method does not find a row then return $segment not changed, means return '5-lime'.

Ah true, missed that one.

avatar csthomas csthomas - edited - 30 Jul 2016
avatar csthomas
csthomas - comment - 30 Jul 2016

After applying patch it removes the ID of tags but not replaces tags/tag/ with tags/ from the URL as you said in first place.

You right,

[updated]
you talk about:
/component/tags/tag NOT /tags/tag

my description was incorrect, I wrote to fast,
I concerned on (SEF enabled) links that have some menu item.

avatar csthomas csthomas - edited - 30 Jul 2016
avatar JoshuaLewis
JoshuaLewis - comment - 21 Sep 2016

Just checking in on this. Would like to see this make it into J 3.7 ?


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

avatar zero-24
zero-24 - comment - 21 Sep 2016

This means we need test here @JoshuaLewis ;)

avatar JoshuaLewis JoshuaLewis - test_item - 21 Sep 2016 - Tested successfully
avatar JoshuaLewis
JoshuaLewis - comment - 21 Sep 2016

I have tested this item successfully on 40b7c93

Works quite well. ? Great little PR!


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

avatar JoshuaLewis
JoshuaLewis - comment - 22 Sep 2016

@zero-24 Can you test it as well?

avatar csthomas csthomas - change - 22 Sep 2016
The description was changed
avatar csthomas csthomas - edited - 22 Sep 2016
avatar stellainformatica
stellainformatica - comment - 31 Oct 2016

Hi, I report a issue with tags menu items in a multilanguage site.
If a tag menu item (i.e. .../index.php/eventi) is set to all language, the link of the tag in the article is right the same.
If the tag menu item is set to a specific language, the link of the tag in tha article (of the same language) is not correct .../index.php/component/tags/tag/eventi

I tested a 3.6.4 with this patch but the issue still remain. Is ti related or better to open a new tracker?


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

avatar csthomas
csthomas - comment - 31 Oct 2016

It is better to create another issue.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 8 Jan 2017

@csthomas is this pr still to test?

avatar csthomas
csthomas - comment - 8 Jan 2017

Yes.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 9 Jan 2017

I have tested this item successfully on 40b7c93


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

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 9 Jan 2017 - Tested successfully
avatar wilsonge wilsonge - change - 17 Jan 2017
The description was changed
Status Pending Ready to Commit
avatar wilsonge wilsonge - edited - 17 Jan 2017
avatar wilsonge
wilsonge - comment - 17 Jan 2017

Two good tests here. So I'm setting RTC. BUT I want @rdeutz to review this as I don't know if we want to go down this path or move tags across to "new" routing before we try this...


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

avatar rdeutz
rdeutz - comment - 17 Jan 2017

Seems to me a good change

avatar rdeutz rdeutz - change - 17 Jan 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-01-17 13:47:35
Closed_By rdeutz
Labels Added: ?
avatar rdeutz rdeutz - close - 17 Jan 2017
avatar rdeutz rdeutz - merge - 17 Jan 2017

Add a Comment

Login with GitHub to post a comment