bin/magento setup:di:compile
Show Admin login form
PHP Fatal error: Uncaught Error: Call to a member function setActive() on boolean in vendor\magento\module-backend\Model\View\Result\Page.php:27
Stack trace:
#0 vendor\magento\module-backend\Controller\Adminhtml\Dashboard\Index.php(35): Magento\Backend\Model\View\Result\Page->setActiveMenu('Magento_Backend...')
#1 vendor\magento\framework\App\Action\Action.php(107): Magento\Backend\Controller\Adminhtml\Dashboard\Index->execute()
#2 vendor\magento\module-backend\App\AbstractAction.php(229): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#3 vendor\magento\framework\App\FrontController.php(55): Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))
#4 vendor\magento\framework\App\Http.php(135): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#5 C:\WTServer\WWW\ma in vendor\magento\module-backend\Model\View\Result\Page.php on line 27
If I delete the file generated\metadata\global.php
, login form is showing.
@minhluan259, thank you for your report.
We were not able to reproduce this issue by following the steps you provided. Using module from https://github.com/magento/magento2/issues/11526 also have no effect - all works correctly. Please provide more detailed steps to reproduce or try to reproduce this issue on a clean installation.
@minhluan259, we are closing this issue due to inactivity. If you'd like to update it, please reopen the issue.
@minhluan259, we are closing this issue due to inactivity. If you'd like to update it, please reopen the issue.
I have the same issue. And I can resolve it by doing the same thing. Removing "generated\metadata\global.php" fixes it.
try running php bin/magento setup:di:compile this should solve it . you may need to give the var cache folder the correct permission after this command
Me too facing the same issue every time install new magento on my local,
I am using xamp(opened it as administrator too)
Every time I run setup:di:copile
All instatlation goes only this error left behind
Uncaught Error: Call to a member function setActive() on boolean in C:\xampp\htdocs\Maze\vendor\magento\module-backend\Model\View\Result\Page.php:27 Stack trace: #0
Hello, confirm the same error in magento 2.2.3, working in local with Laragon.
Removing "generated\metadata\global.php" fixes it.
Hello, i am facing same issue in magento 2.2.4 working in local windows + xampp installation and Removing "generated\metadata\global.php" fixes it.
Continues to be an issue. 2.3-develop. windows + wamp. Removing "generated\metadata\global.php" fixes it.
The same issue on Magento 2.2.5 on windows + wamp after installing first extension. Removing global.php file fixed it.
"The same issue on windows + wamp after installing first extension. Removing global.php file fixed it."
Solved my problem too
I have the same issue. And I can resolve it by doing the same thing. Removing "generated\metadata\global.php" fixes it.
it work to me
I have the same issue. anyone has a solution yet? I don't think delete global.php is the proper solution?
Depends what solution you are after. I gave up with wamp.
Instead I've started to use docker for M2 dev work.
I'm facing the same issue with 2.1.10. Even though that with a recompilation works. The problem is why the files are been corrupted.
From my debugging, I could check that the issue is that the block is not found, however, the block is defined in the layout and the class do exist. So somehow the generated files are been corrupted, and that's the main issue.
The problem is that the layout xml of this controller path is not loading properly.
Check that the name and the namespace of the controller is matching with the layout file name. Take care of the case sensitivity.
For example:
Removing "generated\metadata\global.php" it is just a temporary fix. You will get the error again when will run setup:di:compile. The solution for us was one from FaTe from stackoverflow
To fix the issue try to run
composer install
in M2 root directory.
You can think that this makes no sense, but after this command autoload file was was regenerated and the issue fixed.
I've got the same issue. everything works just fin after deleting the globals.php
This is still broken.
Still broken
This issue still happens to me :( - Windows is not supported... How Badly ECOS...
Most helpful comment
I have the same issue. And I can resolve it by doing the same thing. Removing "generated\metadata\global.php" fixes it.