2

In magento 2.2, I have 2 store in my website. When, I switch to default store to other store. Then, it will display error like this

1 exception(s): Exception #0 (Magento\Framework\Exception\NoSuchEntityException): Requested store is not found

How can I solve this??

Please help me.

2

At line 164 add the below code of Magento\Store\Model\StoreManager:

    if(!$storeId){
        if(isset($_COOKIE['store']) && $_COOKIE['store'] !== ''){
            $storeId = $_COOKIE['store'];
        } else {
            $storeId = $this->getDefaultStoreView()->getCode();
        }           
    }

And then, change 155 line of Magento\Store\Model\StoreManager

=> FROM :

if (null === $this->currentStoreId) {

=> To :

if (null === $this->currentStoreId || '' === $this->currentStoreId) {
0

You can see the notes on https://github.com/magento/magento2/issues/11453. I ran into same issue for magento 2.2.

Your Answer

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