?
Referenced as Related to: # 4448
avatar oneumyvakin
oneumyvakin
21 Sep 2014

Steps to reproduce the issue

  1. Enable SEF.
  2. Create "category1" with ID 1 and alias "alias1"
  3. For "category1" create child "category2" with ID 2 and alias "alias2"
  4. Create "tag1" and assign it to "category2"
  5. Try to search by "tag1"

Expected result

In search result there will be right URL to "category2" like:
/index.php/component/content/category/1-alias1/2-alias2
or
/index.php/component/content/category/2-alias2
or
/index.php/component/content/category/alias1/2-alias2
or
/index.php/component/content/category/2-alias1/2-alias2

Actual result

In search result category2 has a wrong URL which gives 404 error
/index.php/component/content/category/2-alias1/alias2

System information (as much as possible)

Joomla 3.3.3
PHP 5.4

Additional comments

only if SEF is On
only if search by tag

avatar oneumyvakin oneumyvakin - open - 21 Sep 2014
avatar Kubik-Rubik
Kubik-Rubik - comment - 24 Sep 2014

I can confirm this issue. Set to "Confirmed"!

PS: The plugin "Search - Tags" has to be activated manually first.

This comment was created with the J!Tracker Application at http://issues.joomla.org/.

avatar Kubik-Rubik Kubik-Rubik - change - 24 Sep 2014
Status New Confirmed
Easy No Yes
avatar oneumyvakin
oneumyvakin - comment - 30 Sep 2014

This patch works for me:

--- "components/com_content/router.php"
+++ "components/com_content/router.php"
@@ -171,7 +171,7 @@ class ContentRouter extends JComponentRouterBase

        if (!$advanced && count($array))
        {
-               $array[0] = (int) $catid . ':' . $array[0];
+               $array[count($array)-1] = (int) $catid . ':' . $array[count($array)-1];
        }

        $segments = array_merge($segments, $array);
avatar Kubik-Rubik
Kubik-Rubik - comment - 1 Oct 2014

@oneumyvakin Please do a PR (Pull Request) with the fix so that we can check it and get it into the core!

avatar oneumyvakin
oneumyvakin - comment - 1 Oct 2014

Viktor, is there some tutorial how to create PR request to GitHub project from TortoiseGIT? I've tries last day but with no luck.

avatar Kubik-Rubik
Kubik-Rubik - comment - 1 Oct 2014

@oneumyvakin

I use the build-in functionality of PhpStorm to connect with GitHub. In the Docs we have a general description how to do a PR: http://docs.joomla.org/My_first_pull_request_to_Joomla!_on_Github

Hopefully it helps you!

avatar nicksavov
nicksavov - comment - 15 Oct 2014

For a small change like this, here's the easiest way by far:
http://docs.joomla.org/Using_the_Github_UI_to_Make_Pull_Requests

avatar nicksavov nicksavov - change - 16 Oct 2014
Labels Added: ?
avatar brianteeman
brianteeman - comment - 17 Oct 2014

Closed in favor of #4448

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

avatar jissues-bot jissues-bot - close - 17 Oct 2014
avatar zero-24 zero-24 - close - 17 Oct 2014
avatar brianteeman brianteeman - change - 17 Oct 2014
Status Confirmed Closed
avatar jissues-bot
jissues-bot - comment - 17 Oct 2014
avatar jissues-bot jissues-bot - change - 17 Oct 2014
Closed_Date 0000-00-00 00:00:00 2014-10-17 00:10:37
avatar zero-24 zero-24 - change - 7 Jul 2015
Labels Added: ?

Add a Comment

Login with GitHub to post a comment