{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/6291","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/6291/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/6291/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/6291/events","html_url":"https://github.com/joomla/joomla-cms/pull/6291","id":59736252,"number":6291,"title":"[fix] wrong link when tag is in a menu","user":{"login":"phproberto","id":1119272,"avatar_url":"https://avatars.githubusercontent.com/u/1119272?v=3","gravatar_id":"","url":"https://api.github.com/users/phproberto","html_url":"https://github.com/phproberto","followers_url":"https://api.github.com/users/phproberto/followers","following_url":"https://api.github.com/users/phproberto/following{/other_user}","gists_url":"https://api.github.com/users/phproberto/gists{/gist_id}","starred_url":"https://api.github.com/users/phproberto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phproberto/subscriptions","organizations_url":"https://api.github.com/users/phproberto/orgs","repos_url":"https://api.github.com/users/phproberto/repos","events_url":"https://api.github.com/users/phproberto/events{/privacy}","received_events_url":"https://api.github.com/users/phproberto/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/joomla/joomla-cms/labels/PR-staging","name":"PR-staging","color":"c7def8"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2015-03-04T01:25:58Z","updated_at":"2015-03-07T10:50:06Z","closed_at":"2015-03-07T09:35:37Z","pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/6291","html_url":"https://github.com/joomla/joomla-cms/pull/6291","diff_url":"https://github.com/joomla/joomla-cms/pull/6291.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/6291.patch"},"body":"## Description\r\nhttps://github.com/joomla/joomla-cms/pull/5105 changed the way that tag URLs are returned when a tag has a custom menu item\r\n\r\n## How to reproduce the issue\r\n1. Install joomla with `Test English` sample data. \r\n2. In global configuration enable `Friendly URLs` and `URL rewrititing`. This can be tested also without URL rewriting but the URLs will contain the `index.php` part:\r\n\r\n![tag-url-config](https://cloud.githubusercontent.com/assets/1119272/6476308/7d8b74a2-c214-11e4-88c4-186f11b67178.png)\r\n\r\n3. Duplicate htaccess.txt and rename the new file to .htaccess. \r\n2. On main menu create a new menu item of type Tags > Tagged items selecting the `Green` tag and `Article` as content type:\r\n\r\n![tag-menu-item](https://cloud.githubusercontent.com/assets/1119272/6476282/23ff71b8-c214-11e4-9e7c-99103b141692.png)\r\n3. Reload the main page. You will see the new menu link in the Main menu. If you put your mouse over the `Green` tag you will see that the URL shown is `http://localhost/jcms3x/tag-test/4-green` (being `tag-test` the menu alias). This is not correct because it should be (and it was before v3.4)  `http://localhost/jcms3x/tag-test`. The issue is that now we are adding the Itemid to the URL instead of using plain `index.php?Itemid=xxx` if a menu item is found for this tag.\r\n\r\n## How to test the fix\r\nApply the patch and just reload the home page. The link should be correct now.\r\n\r\n## Backward compatibility issues\r\nThis tries to fix an already existing B/C issue that will change existing sites URLs.\r\n\r\n## Additional comments\r\n\r\nPlease @Hackwar can you review this? Thanks!\r\n"},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/77683877","html_url":"https://github.com/joomla/joomla-cms/pull/6291#issuecomment-77683877","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/6291","id":77683877,"user":{"login":"joomdonation","id":977664,"avatar_url":"https://avatars.githubusercontent.com/u/977664?v=3","gravatar_id":"","url":"https://api.github.com/users/joomdonation","html_url":"https://github.com/joomdonation","followers_url":"https://api.github.com/users/joomdonation/followers","following_url":"https://api.github.com/users/joomdonation/following{/other_user}","gists_url":"https://api.github.com/users/joomdonation/gists{/gist_id}","starred_url":"https://api.github.com/users/joomdonation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joomdonation/subscriptions","organizations_url":"https://api.github.com/users/joomdonation/orgs","repos_url":"https://api.github.com/users/joomdonation/repos","events_url":"https://api.github.com/users/joomdonation/events{/privacy}","received_events_url":"https://api.github.com/users/joomdonation/received_events","type":"User","site_admin":false},"created_at":"2015-03-07T10:50:06Z","updated_at":"2015-03-07T10:50:06Z","body":"@Hackwar So you are saying $item->query['id'][$position]  and $tagId might have different value?"}}