{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/18564","repository_url":"https://api.github.com/repos/joomla/joomla-cms","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/18564/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/18564/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/18564/events","html_url":"https://github.com/joomla/joomla-cms/pull/18564","id":273490405,"number":18564,"title":"Make sure the view exists before adding it to the menu lookup array, remove PHP Notices","user":{"login":"csthomas","id":9054379,"avatar_url":"https://avatars3.githubusercontent.com/u/9054379?v=4","gravatar_id":"","url":"https://api.github.com/users/csthomas","html_url":"https://github.com/csthomas","followers_url":"https://api.github.com/users/csthomas/followers","following_url":"https://api.github.com/users/csthomas/following{/other_user}","gists_url":"https://api.github.com/users/csthomas/gists{/gist_id}","starred_url":"https://api.github.com/users/csthomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csthomas/subscriptions","organizations_url":"https://api.github.com/users/csthomas/orgs","repos_url":"https://api.github.com/users/csthomas/repos","events_url":"https://api.github.com/users/csthomas/events{/privacy}","received_events_url":"https://api.github.com/users/csthomas/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":3,"created_at":"2017-11-13T16:23:31Z","updated_at":"2017-11-14T22:01:10Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/18564","html_url":"https://github.com/joomla/joomla-cms/pull/18564","diff_url":"https://github.com/joomla/joomla-cms/pull/18564.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/18564.patch"},"body":"Other solution for the same problem as in #17323, #18043\r\n\r\n### Summary of Changes\r\nDo not add view name to the menu `lookup` array if the view does not exists.\r\n\r\nRemove PHP Notice:\r\n`Notice: Undefined index: loginx in .../libraries/src/Component/Router/Rules/MenuRules.php on line 216`\r\n\r\n`Notice: Trying to get property of non-object in .../libraries/src/Component/Router/Rules/MenuRules.php on line 216`\r\n\r\n### Testing Instructions\r\n1. Install joomla.\r\n2. Go to backend and edit a menu item.\r\n3. Change name of view in the link field and save. \r\n    Please see attached video. I used FF Inspector (Ctrl + Shift + C)\r\n![menu_check_view_name2](https://user-images.githubusercontent.com/9054379/32736026-bf39d21e-c896-11e7-9ba4-7f993101bf30.gif)\r\n\r\n\r\n4. Go to frontend in order to see changes.\r\n5. Before PR there are 2 php notices, after PR they disappear.\r\n\r\n\r\n### Expected result\r\nNo PHP Notices\r\n\r\n### Actual result\r\nPHP Notices.\r\n\r\n### Documentation Changes Required\r\nNo"},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/344413686","html_url":"https://github.com/joomla/joomla-cms/pull/18564#issuecomment-344413686","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/18564","id":344413686,"user":{"login":"csthomas","id":9054379,"avatar_url":"https://avatars3.githubusercontent.com/u/9054379?v=4","gravatar_id":"","url":"https://api.github.com/users/csthomas","html_url":"https://github.com/csthomas","followers_url":"https://api.github.com/users/csthomas/followers","following_url":"https://api.github.com/users/csthomas/following{/other_user}","gists_url":"https://api.github.com/users/csthomas/gists{/gist_id}","starred_url":"https://api.github.com/users/csthomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csthomas/subscriptions","organizations_url":"https://api.github.com/users/csthomas/orgs","repos_url":"https://api.github.com/users/csthomas/repos","events_url":"https://api.github.com/users/csthomas/events{/privacy}","received_events_url":"https://api.github.com/users/csthomas/received_events","type":"User","site_admin":false},"created_at":"2017-11-14T22:01:10Z","updated_at":"2017-11-14T22:01:10Z","author_association":"CONTRIBUTOR","body":"Yes,  view `loginx` has never exist. \r\nView `section `existed in older joomla version but you will get the same result, blank menu type. \r\n\r\nI do not have other idea how to test old menu item that currently does not exists.\r\n\r\nThis is only a example (a way) to create a menu item that for now does not exist, like with view `section`.\r\n\r\nAfter you create invalid menu item, means with view that is invalid then you get php notices before PR."}}
{"actor":{"display_login":"csthomas"}}