{"action":"created","issue":{"url":"https://api.github.com/repos/magento/magento2/issues/11526","repository_url":"https://api.github.com/repos/magento/magento2","labels_url":"https://api.github.com/repos/magento/magento2/issues/11526/labels{/name}","comments_url":"https://api.github.com/repos/magento/magento2/issues/11526/comments","events_url":"https://api.github.com/repos/magento/magento2/issues/11526/events","html_url":"https://github.com/magento/magento2/issues/11526","id":266238149,"number":11526,"title":"Admin panel not working if I install any custom modules in Magento 2.2.0","user":{"login":"gitpol","id":12528707,"avatar_url":"https://avatars3.githubusercontent.com/u/12528707?v=4","gravatar_id":"","url":"https://api.github.com/users/gitpol","html_url":"https://github.com/gitpol","followers_url":"https://api.github.com/users/gitpol/followers","following_url":"https://api.github.com/users/gitpol/following{/other_user}","gists_url":"https://api.github.com/users/gitpol/gists{/gist_id}","starred_url":"https://api.github.com/users/gitpol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitpol/subscriptions","organizations_url":"https://api.github.com/users/gitpol/orgs","repos_url":"https://api.github.com/users/gitpol/repos","events_url":"https://api.github.com/users/gitpol/events{/privacy}","received_events_url":"https://api.github.com/users/gitpol/received_events","type":"User","site_admin":false},"labels":[{"id":686477690,"url":"https://api.github.com/repos/magento/magento2/labels/Cannot%20Reproduce","name":"Cannot Reproduce","color":"d93f0b","default":false},{"id":688811200,"url":"https://api.github.com/repos/magento/magento2/labels/G1%20Passed","name":"G1 Passed","color":"0e8a16","default":false},{"id":686420665,"url":"https://api.github.com/repos/magento/magento2/labels/G2%20Passed","name":"G2 Passed","color":"0e8a16","default":false}],"state":"closed","locked":false,"assignee":{"login":"magento-engcom-team","id":31669971,"avatar_url":"https://avatars1.githubusercontent.com/u/31669971?v=4","gravatar_id":"","url":"https://api.github.com/users/magento-engcom-team","html_url":"https://github.com/magento-engcom-team","followers_url":"https://api.github.com/users/magento-engcom-team/followers","following_url":"https://api.github.com/users/magento-engcom-team/following{/other_user}","gists_url":"https://api.github.com/users/magento-engcom-team/gists{/gist_id}","starred_url":"https://api.github.com/users/magento-engcom-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magento-engcom-team/subscriptions","organizations_url":"https://api.github.com/users/magento-engcom-team/orgs","repos_url":"https://api.github.com/users/magento-engcom-team/repos","events_url":"https://api.github.com/users/magento-engcom-team/events{/privacy}","received_events_url":"https://api.github.com/users/magento-engcom-team/received_events","type":"User","site_admin":false},"assignees":[{"login":"magento-engcom-team","id":31669971,"avatar_url":"https://avatars1.githubusercontent.com/u/31669971?v=4","gravatar_id":"","url":"https://api.github.com/users/magento-engcom-team","html_url":"https://github.com/magento-engcom-team","followers_url":"https://api.github.com/users/magento-engcom-team/followers","following_url":"https://api.github.com/users/magento-engcom-team/following{/other_user}","gists_url":"https://api.github.com/users/magento-engcom-team/gists{/gist_id}","starred_url":"https://api.github.com/users/magento-engcom-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magento-engcom-team/subscriptions","organizations_url":"https://api.github.com/users/magento-engcom-team/orgs","repos_url":"https://api.github.com/users/magento-engcom-team/repos","events_url":"https://api.github.com/users/magento-engcom-team/events{/privacy}","received_events_url":"https://api.github.com/users/magento-engcom-team/received_events","type":"User","site_admin":false}],"milestone":null,"comments":20,"created_at":"2017-10-17T18:51:50Z","updated_at":"2018-03-19T10:55:21Z","closed_at":"2017-10-19T12:30:41Z","author_association":"NONE","body":"I can't install any custom modules. When I do this, I get error in admin panel in Magento 2.2.0.\r\n\r\n### Preconditions\r\n\r\nI installed it on my PC on Windows 7 and XAMPP 7.1.9 (which contains PHP 7.1.9, Apache 2.4.27, MariaDB 10.1.26). But then I tried it also on Magento optimized hosting from Nexcess and I get exactly the same error.\r\n\r\n### Steps to reproduce\r\n\r\n1. install Magento 2.2.0 with sample data in `D:\\xampp\\htdocs\\my\\` folder\r\n2. verify that Magneto works correctly after installation\r\n3. upload custom module to `D:\\xampp\\htdocs\\my\\app\\code\\Company\\Simple\\` folder (full code of this module is presented at the end of my post)\r\n4. enable the module: \r\n`php magento module:enable Company_Simple`\r\n5. execute Magento commands:\r\n`php magento setup:upgrade`\r\n`php magento setup:di:compile`\r\n6. refresh the \"Dashboard\" page in Magento admin panel. \r\n\r\n### Expected result\r\n\r\nThe \"Dashboard\" page in Magento admin panel should work normally.\r\n\r\n### Actual result\r\n\r\nThe page is blank and the following error is displayed:\r\n\r\n> Fatal error: Uncaught Error: Call to a member function setActive() on boolean in D:\\xampp\\htdocs\\my\\vendor\\magento\\module-backend\\Model\\View\\Result\\Page.php:27 Stack trace: #0 D:\\xampp\\htdocs\\my\\vendor\\magento\\module-backend\\Controller\\Adminhtml\\Dashboard\\Index.php(35): Magento\\Backend\\Model\\View\\Result\\Page->setActiveMenu('Magento_Backend...') #1 D:\\xampp\\htdocs\\my\\vendor\\magento\\framework\\App\\Action\\Action.php(107): Magento\\Backend\\Controller\\Adminhtml\\Dashboard\\Index->execute() #2 D:\\xampp\\htdocs\\my\\vendor\\magento\\module-backend\\App\\AbstractAction.php(229): Magento\\Framework\\App\\Action\\Action->dispatch(Object(Magento\\Framework\\App\\Request\\Http)) #3 D:\\xampp\\htdocs\\my\\vendor\\magento\\framework\\App\\FrontController.php(55): Magento\\Backend\\App\\AbstractAction->dispatch(Object(Magento\\Framework\\App\\Request\\Http)) #4 D:\\xampp\\htdocs\\my\\vendor\\magento\\framework\\App\\Http.php(135): Magento\\Framework\\App\\FrontController->dispatch(Object(Magento\\Framework\\App\\Request\\Http in D:\\xampp\\htdocs\\my\\vendor\\magento\\module-backend\\Model\\View\\Result\\Page.php on line 27 \r\n\r\n_**Module manager works fine**_\r\n\r\nSo I can't display any page in admin panel, but when I manually type in the address of Module Manager in my browser (`http://localhost/my/setup/#/module-grid`), the Module Manager page is displayed correctly and my module `Company_Simple` is listed in the table of installed modules:\r\n\r\n> company/module-simple | Company_Simple | 2.0.0 | Company\r\n\r\n_**How to make the admin work correctly again**_\r\n\r\nI noticed that if I delete this file:\r\n`generated/metadata/global.php`\r\nthe admin panel starts to work correctly again.\r\n\r\n## Full code of my custom module\r\n\r\nBelow is the full code of my test module. It is a minimal module for testing. Here's the files structure:\r\n\r\n- etc/module.xml\r\n- Helper/Data.php\r\n- composer.json\r\n- registration.php\r\n\r\nHere's the code of each file:\r\n\r\n**composer.json:**\r\n\r\n```\r\n{\r\n    \"name\": \"company/module-simple\",\r\n    \"description\": \"\",\r\n    \"require\": {\r\n        \"php\": \"~5.6.0|~7.0.0|~7.1.0\"\r\n    },\r\n    \"type\": \"magento2-module\",\r\n    \"version\": \"2.0.0\",\r\n    \"license\": [\r\n        \"Proprietary\"\r\n    ],\r\n    \"autoload\": {\r\n        \"files\": [\r\n            \"registration.php\"\r\n        ],\r\n        \"psr-4\": {\r\n            \"Company\\\\Simple\\\\\": \"\"\r\n        }\r\n    }\r\n}\r\n```\r\n\r\n**registration.php:**\r\n\r\n```\r\n<?php\r\n\r\n\\Magento\\Framework\\Component\\ComponentRegistrar::register(\r\n    \\Magento\\Framework\\Component\\ComponentRegistrar::MODULE,\r\n    'Company_Simple',\r\n    __DIR__\r\n);\r\n```\r\n\r\n**etc/module.xml:**\r\n\r\n```\r\n<?xml version=\"1.0\"?>\r\n<config xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:framework:Module/etc/module.xsd\">\r\n    <module name=\"Company_Simple\" setup_version=\"2.0.0\" />\r\n</config>\r\n```\r\n\r\n**Helper/Data.php:**\r\n\r\n```\r\n<?php\r\n\r\nnamespace Company\\Simple\\Helper;\r\n\r\nuse Magento\\Framework\\App\\Helper\\AbstractHelper;\r\n\r\nclass Data extends AbstractHelper\r\n{\r\n    /**\r\n     * Test method\r\n     *\r\n     * @return string\r\n     */\r\n    public function doSomething()\r\n    {\r\n        return \"Do something.\";\r\n    }\r\n}\r\n```\r\n\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/magento/magento2/issues/comments/374173189","html_url":"https://github.com/magento/magento2/issues/11526#issuecomment-374173189","issue_url":"https://api.github.com/repos/magento/magento2/issues/11526","id":374173189,"user":{"login":"vy-shmal","id":14836183,"avatar_url":"https://avatars2.githubusercontent.com/u/14836183?v=4","gravatar_id":"","url":"https://api.github.com/users/vy-shmal","html_url":"https://github.com/vy-shmal","followers_url":"https://api.github.com/users/vy-shmal/followers","following_url":"https://api.github.com/users/vy-shmal/following{/other_user}","gists_url":"https://api.github.com/users/vy-shmal/gists{/gist_id}","starred_url":"https://api.github.com/users/vy-shmal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vy-shmal/subscriptions","organizations_url":"https://api.github.com/users/vy-shmal/orgs","repos_url":"https://api.github.com/users/vy-shmal/repos","events_url":"https://api.github.com/users/vy-shmal/events{/privacy}","received_events_url":"https://api.github.com/users/vy-shmal/received_events","type":"User","site_admin":false},"created_at":"2018-03-19T10:55:21Z","updated_at":"2018-03-19T10:55:21Z","author_association":"NONE","body":"Are you running XAMPP in administration mode.  Because I had the same issue and solved it by  re running XAMPP as administrator, restart processes and redeploy static content. "}}
{"actor":{"display_login":"vy-shmal"}}