0

I am having the following error message in Magento 2

Error: Call to a member function getCode() on null in /vendor/magento/module-store/App/Action/Plugin/Context.php:148 Stack trace: 
#0 /vendor/magento/module-store/App/Action/Plugin/Context.php(100): Magento\Store\App\Action\Plugin\Context->updateContext(Object(Magento\Framework\App\Request\Http), Object(Magento\Store\Model\Store\Interceptor)) 
#1 /vendor/magento/framework/Interception/Interceptor.php(121): Magento\Store\App\Action\Plugin\Context->beforeDispatch(Object(Magento\Cms\Controller\Index\Index\Interceptor), Object(Magento\Framework\App\Request\Http))

Any suggestion on how to solve this problem?

1
  • in vendor/magento/module-store/App/Action/Plugin/Context.php on line 148 getDefaultStoreView() is returning null hence the error message. $this->storeManager->getDefaultStoreView()->getCode(); Jun 23 at 14:52

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.