{"action":"created","issue":{"url":"https://api.github.com/repos/magento/magento2/issues/2725","labels_url":"https://api.github.com/repos/magento/magento2/issues/2725/labels{/name}","comments_url":"https://api.github.com/repos/magento/magento2/issues/2725/comments","events_url":"https://api.github.com/repos/magento/magento2/issues/2725/events","html_url":"https://github.com/magento/magento2/issues/2725","id":122392055,"number":2725,"title":"setup/*.xml Config Files Not Read During Setup","user":{"login":"CNanninga","id":668830,"avatar_url":"https://avatars.githubusercontent.com/u/668830?v=3","gravatar_id":"","url":"https://api.github.com/users/CNanninga","html_url":"https://github.com/CNanninga","followers_url":"https://api.github.com/users/CNanninga/followers","following_url":"https://api.github.com/users/CNanninga/following{/other_user}","gists_url":"https://api.github.com/users/CNanninga/gists{/gist_id}","starred_url":"https://api.github.com/users/CNanninga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CNanninga/subscriptions","organizations_url":"https://api.github.com/users/CNanninga/orgs","repos_url":"https://api.github.com/users/CNanninga/repos","events_url":"https://api.github.com/users/CNanninga/events{/privacy}","received_events_url":"https://api.github.com/users/CNanninga/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/magento/magento2/labels/PS","name":"PS","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-15T23:25:47Z","updated_at":"2015-12-16T18:43:07Z","closed_at":null,"body":"Some areas of the core code have config files defined for the \"setup\" area.  E.g., Magento_CmsUrlRewrite/etc/setup/events.xml.  However, these config files are not read during the command-line setup:upgrade operation.\r\n\r\nReproduction steps:\r\n1. Create a module data upgrade script that saves a new CMS page.\r\n2. Run \"magento setup:upgrade\".\r\n3. Observe that, in the database, a new record exists in cms_page for the new page, but no new record exists in url_rewrite (which would normally occur when saving a new page in the admin).\r\n\r\nThe logic that is responsible for saving this URL rewrite record is in an observer defined in Magento_CmsUrlRewrite/etc/adminhtml/events.xml and Magento_CmsUrlRewrite/etc/setup/events.xml.  This works fine for the adminhtml area, but no setup area is ever loaded.\r\n\r\nAreas are defined in di.xml in the \"areas\" argument of Magento\\Framework\\App\\AreaList.  There are no di.xml files defining a \"setup\" item in this argument.  I have confirmed that, when running \"magento setup:upgrade\", the result of Magento\\Framework\\Config::getCurrentScope (which returns \"frontend\" when the area context is \"frontend\") is \"global\"."},"comment":{"url":"https://api.github.com/repos/magento/magento2/issues/comments/165207580","html_url":"https://github.com/magento/magento2/issues/2725#issuecomment-165207580","issue_url":"https://api.github.com/repos/magento/magento2/issues/2725","id":165207580,"user":{"login":"mazhalai","id":3421295,"avatar_url":"https://avatars.githubusercontent.com/u/3421295?v=3","gravatar_id":"","url":"https://api.github.com/users/mazhalai","html_url":"https://github.com/mazhalai","followers_url":"https://api.github.com/users/mazhalai/followers","following_url":"https://api.github.com/users/mazhalai/following{/other_user}","gists_url":"https://api.github.com/users/mazhalai/gists{/gist_id}","starred_url":"https://api.github.com/users/mazhalai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mazhalai/subscriptions","organizations_url":"https://api.github.com/users/mazhalai/orgs","repos_url":"https://api.github.com/users/mazhalai/repos","events_url":"https://api.github.com/users/mazhalai/events{/privacy}","received_events_url":"https://api.github.com/users/mazhalai/received_events","type":"User","site_admin":false},"created_at":"2015-12-16T18:43:07Z","updated_at":"2015-12-16T18:43:07Z","body":"@CNanninga Thank you, we have created MAGETWO-46966 to fix it."}}