Skip to content

Error: Call to a member function setActive() on bool in /var/www/html/project.local/vendor/magento/module-backend/Model/View/Result/Page.php:26

showing this error while clicking on a menu item created for a grid

public function execute()
{
/** @var MagentoBackendModelViewResultPage $resultPage */
$resultPage = $this->_resultPageFactory->create();
$resultPage->setActiveMenu(‘Vendor_Grid::menu_id’);
$resultPage->getConfig()->getTitle()->prepend(__(‘Certificate Grid List’));

    return $resultPage;
}