AnswerBun.com

Magento 2: Requested store is not found in product

I get this message “Requested store is not found” when I want to create a new product or edit it.

Magento 2.2.5

php -f bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f

This already applies but does not solve

Any other solution?

Requested store is not found in product

Below error showing in log file.

main.CRITICAL: Requested store is not found {“exception”:”[object]
(MagentoFrameworkExceptionNoSuchEntityException(code: 0):
Requested store is not found at
/vendor/magento/module-store/Model/StoreRepository.php:109)”}

Please help me.

Magento Asked by CesarChris710 on January 3, 2021

2 Answers

2 Answers

Try to use this query in your database :

UPDATE `store` SET store_id = 0 WHERE code='admin';

UPDATE `store_group` SET group_id = 0 WHERE name='Default';

UPDATE `store_website` SET website_id = 0 WHERE code='admin';

Answered by Emipro Technologies Pvt. Ltd. on January 3, 2021

At line no 164 add the below code of MagentoStoreModelStoreManager:

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

And then, change line no 155 of MagentoStoreModelStoreManager

=> FROM :

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

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

Answered by vikrant zilpe on January 3, 2021

Add your own answers!

Related Questions

product image missing from backend after updating

4  Asked on November 15, 2021 by j-degaard

     

Vertex generation doesn’t exist …?

1  Asked on November 15, 2021 by mariam-ghalleb

     

Problem with quotation marks on PHP export

2  Asked on November 13, 2021 by stefan-schulte

     

How to add custom attribute in filter in Magento2?

2  Asked on November 13, 2021 by bhagyashri-pawar

   

Bundle inside bundle

2  Asked on November 10, 2021 by marais-rossouw

     

Change Order Status to custom status after order is complete

1  Asked on November 10, 2021 by mike-tim-turner

   

Magento 2 store-view progmatically

3  Asked on November 8, 2021 by haim

     

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved.