{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/16756","repository_url":"https://api.github.com/repos/joomla/joomla-cms","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/16756/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/16756/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/16756/events","html_url":"https://github.com/joomla/joomla-cms/pull/16756","id":236747109,"number":16756,"title":"Don't take \"Create Article\" menuitem for an article edit","user":{"login":"Bakual","id":1018684,"avatar_url":"https://avatars1.githubusercontent.com/u/1018684?v=3","gravatar_id":"","url":"https://api.github.com/users/Bakual","html_url":"https://github.com/Bakual","followers_url":"https://api.github.com/users/Bakual/followers","following_url":"https://api.github.com/users/Bakual/following{/other_user}","gists_url":"https://api.github.com/users/Bakual/gists{/gist_id}","starred_url":"https://api.github.com/users/Bakual/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bakual/subscriptions","organizations_url":"https://api.github.com/users/Bakual/orgs","repos_url":"https://api.github.com/users/Bakual/repos","events_url":"https://api.github.com/users/Bakual/events{/privacy}","received_events_url":"https://api.github.com/users/Bakual/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":7,"created_at":"2017-06-18T21:35:27Z","updated_at":"2017-06-22T00:32:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/16756","html_url":"https://github.com/joomla/joomla-cms/pull/16756","diff_url":"https://github.com/joomla/joomla-cms/pull/16756.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/16756.patch"},"body":"Pull Request for Issue #12687 and #16612 .\r\n\r\n### Summary of Changes\r\nThis adjusts the ContentRouter so it only takes the \"Create Article\" menuitem for new articles, not when editing an existing article. I adjusted the Viewconfiguration for that and added `&a_id=0` to the URL for the view in the controller.\r\nPlease note that most of the change are only within com_content, but there is one change in the menu rule which may affect other extensions. But only if they use those new JComponentRouterView stuff and I think the change should be fine. If you come into that part of the code and don't have a key set in the menuitem, it will not be stored into the needles array and never be used for the URL. So that looked wrong anyway.\r\n\r\n### Testing Instructions\r\n* Create at least two articles. Have a menuitem pointing to one of them and a menuitem pointing to the category.\r\n* Create a menuitem \"Create Article\". For better testing you can adjust the settings within that menuitem (eg the title or the standardcategory) so the view is distinguishable easy from a regular edit.\r\n* Now try the article edit links (in the category list and/or the single article view) and that \"Create Article\" link\r\n\r\n\r\n### Expected result\r\n* The \"Create Article\" menuitem should be used for any \"New Article\" links. Test for example the \"New\" button in the category list\r\n* The edit links should **not** use the \"Create Article\" menuitem. Instead it should be based on the article menuitem or the category one. Whatever fits best.\r\n\r\n### Actual result\r\nAny edit links use the \"Create Article\" menuitem\r\n\r\n\r\n### Documentation Changes Required\r\nDon't think there is any doc at all for this router stuff."},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/310242222","html_url":"https://github.com/joomla/joomla-cms/pull/16756#issuecomment-310242222","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/16756","id":310242222,"user":{"login":"jim-porter","id":29616315,"avatar_url":"https://avatars2.githubusercontent.com/u/29616315?v=3","gravatar_id":"","url":"https://api.github.com/users/jim-porter","html_url":"https://github.com/jim-porter","followers_url":"https://api.github.com/users/jim-porter/followers","following_url":"https://api.github.com/users/jim-porter/following{/other_user}","gists_url":"https://api.github.com/users/jim-porter/gists{/gist_id}","starred_url":"https://api.github.com/users/jim-porter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jim-porter/subscriptions","organizations_url":"https://api.github.com/users/jim-porter/orgs","repos_url":"https://api.github.com/users/jim-porter/repos","events_url":"https://api.github.com/users/jim-porter/events{/privacy}","received_events_url":"https://api.github.com/users/jim-porter/received_events","type":"User","site_admin":false},"created_at":"2017-06-22T00:32:05Z","updated_at":"2017-06-22T00:32:05Z","body":"I have tested this item :white_check_mark: successfully on c25284ac31728644ccec37f4d80d8164722ab4b6<br /><br />I had this problem with a production site and tested this solution. The test was successful and fully resolved the problem.<hr /><sub>This comment was created with the <a href=\"https://github.com/joomla/jissues\">J!Tracker Application</a> at <a href=\"https://issues.joomla.org/tracker/joomla-cms/16756\">issues.joomla.org/tracker/joomla-cms/16756</a>.</sub>"}}
{"actor":{"display_login":"jim-porter"}}