Uncaught Error: Call to a member function setActive

  • Post author:
  • Post category:其他




Error:

 Fatal error: Uncaught Error: Call to a member function setActive() on boolean in /var/www/html/vendor/magento/module-backend/Model/View/Result/Page.php:27 Stack trace: #0 /var/www/html/app/code/test/Review/Controller/Adminhtml/Review/Index.php(42): Magento\Backend\Model\View\Result\Page->setActiveMenu('test_Revie...') #1 /var/www/html/vendor/magento/framework/App/Action/Action.php(108): test\Review\Controller\Adminhtml\Review\Index->execute() #2 /var/www/html/vendor/magento/module-backend/App/AbstractAction.php(231): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http)) #3 /var/www/html/vendor/magento/framework/App/FrontController.php(159): Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http)) #4 /var/www/html/vendor/magento/framework/App/FrontController.php(99): Magento\Framework\App\FrontController->processRequest(Object(Magento\Framework\App\Request\Http), Object(test\Review\Controller\Adminhtml\Review\Index)) #5 /var/www/html/ve in /var/www/html/vendor/magento/module-backend/Model/View/Result/Page.php on line 27


Solution:

Removing “generated\metadata\global.php” fixes it.


Note

: The metadata folder under generated folder has hidden, you need make this display


https://github.com/magento/magento2/issues/13504



版权声明:本文为yongbuyanqi88888原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。