{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/20211","repository_url":"https://api.github.com/repos/joomla/joomla-cms","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/20211/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/20211/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/20211/events","html_url":"https://github.com/joomla/joomla-cms/pull/20211","id":316567687,"number":20211,"title":"[com_content] Fix category link  and displayed layout in multilanguage association items (Revert #19681)","user":{"login":"Septdir","id":18382023,"avatar_url":"https://avatars3.githubusercontent.com/u/18382023?v=4","gravatar_id":"","url":"https://api.github.com/users/Septdir","html_url":"https://github.com/Septdir","followers_url":"https://api.github.com/users/Septdir/followers","following_url":"https://api.github.com/users/Septdir/following{/other_user}","gists_url":"https://api.github.com/users/Septdir/gists{/gist_id}","starred_url":"https://api.github.com/users/Septdir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Septdir/subscriptions","organizations_url":"https://api.github.com/users/Septdir/orgs","repos_url":"https://api.github.com/users/Septdir/repos","events_url":"https://api.github.com/users/Septdir/events{/privacy}","received_events_url":"https://api.github.com/users/Septdir/received_events","type":"User","site_admin":false},"labels":[{"id":60721348,"url":"https://api.github.com/repos/joomla/joomla-cms/labels/PR-staging","name":"PR-staging","color":"c7def8","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-04-22T10:35:26Z","updated_at":"2018-04-22T13:06:53Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/20211","html_url":"https://github.com/joomla/joomla-cms/pull/20211","diff_url":"https://github.com/joomla/joomla-cms/pull/20211.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/20211.patch"},"body":"Pull Request for Issue #20199.\r\n\r\n### Summary of Changes\r\nRevert #19681 PR\r\n\r\n### Reasons\r\n1.  Bag with `layout=` or `layout=templatelayout`  in com_content category link  \r\n*This bug is fraught with the fact that search results could get duplicate pages. And some No Dubles \\ Canonical Links Plugins began to cause endless redirects*\r\n2. Incorrectness  displayed layout after switch language.  \r\n*I need to have the items located in English vertically, and in Japanese horizontally*\r\n\r\n---\r\n\r\n###  Fix category link bug\r\n#### How reproduce bug by @Quy\r\n* Install the last demo.\r\n* Under System > Global Configuration > Articles > Integration > URL Routing, select Modern\r\n* Search Park Blog\r\n* Hover Park Blog link to see URL:  \r\n`http://localhost/joomla387/index.php/using-joomla/extensions/components/content-component/article-category-blog?layout=`\r\n\r\n#### Testing Instructions\r\nIf you have this bug, apply the patch\r\n\r\n#### Expected result\r\nLink was `/category`\r\n\r\n#### Actual result\r\nNow link `/category?layout`= or `/category?layout=templatelayout` if override com_content category view\r\n\r\n---\r\n\r\n###  Fix link when layout and association\r\n#### Testing Instructions\r\n* Enable multilanguage\r\n* Create a `Category Blog` menu item for first language (en-GB for example)\r\n* Create a `Category List` menu item in second language (de-DE for example)\r\n* Associates this menu items\r\n* Go to first menu item - `Category Blog` (en-GB for example)\r\n* Switch language to second (de-DE for example)\r\n\r\n#### Expected result\r\nAfter redirect, you will see the items in correct layout, depending on the menu item layout  \r\nFor example. For first language (en-GB for example) `Category Blog` layout. For second language (de-DE for example) in `Category List` layout\r\n\r\n#### Actual result\r\nAt this time, the content will be displayed in the previous layout.   \r\nFor example, if you were in first language with `Category Blog` layout (en-GB for example) then after redirect to second language (de-DE for example) you see second language(de-DE for example) items in `Category Blog` layout\r\n"},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/383380324","html_url":"https://github.com/joomla/joomla-cms/pull/20211#issuecomment-383380324","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/20211","id":383380324,"user":{"login":"Septdir","id":18382023,"avatar_url":"https://avatars3.githubusercontent.com/u/18382023?v=4","gravatar_id":"","url":"https://api.github.com/users/Septdir","html_url":"https://github.com/Septdir","followers_url":"https://api.github.com/users/Septdir/followers","following_url":"https://api.github.com/users/Septdir/following{/other_user}","gists_url":"https://api.github.com/users/Septdir/gists{/gist_id}","starred_url":"https://api.github.com/users/Septdir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Septdir/subscriptions","organizations_url":"https://api.github.com/users/Septdir/orgs","repos_url":"https://api.github.com/users/Septdir/repos","events_url":"https://api.github.com/users/Septdir/events{/privacy}","received_events_url":"https://api.github.com/users/Septdir/received_events","type":"User","site_admin":false},"created_at":"2018-04-22T13:06:53Z","updated_at":"2018-04-22T13:06:53Z","author_association":"CONTRIBUTOR","body":"@brianteeman Firstly, these are not my extensions. I do not write such plug-ins, because those that have already proven themselves well. I sent you an email with a couple of other plugins that started to cause problems after upgrading Joomla\r\n\r\nHowever, the bug in the work of these plugins revealed a bug. If a person has problems with infinite redirects, he would not even notice him.\r\n@brianteeman please answer. You often check all the links on your sites?\r\n\r\nAnd this is the core problem.\r\n1. If I use `JRoute::_(ContentHelperRoute::getCategoryRoute($item->id));` I want to get a normal link `/category` And not this `/category?layout=` or `/category?layout=temaplatelayout`  \r\n*In a week or two, these links will go to google and there will be a bunch of page duplicates*\r\n2. *The problem for me personally is not so relevant however.* If I specifically create a menu item with another layout for the second language. I want him out. \r\n*Because of this problem, I decided that I had to completely remove the automatic addition of layout to the link*  \r\nHow to check the problem in multilanguage I described in detail in the description of this PR\r\n\r\n"}}
{"actor":{"display_login":"Septdir"}}