将Magento 2.0.11升级到2.1.3后出现错误。我搜索了互联网,但找不到解决方案。
我在magento根文件夹终端上执行的命令:
composer require magento/product-community-edition 2.1.3 --no-update
./composer.json has been updated
composer update
rm -rf var/di var/generation
chmod -R 777 var/ pub/
rm -rf var/di var/generation
php bin/magento cache:flush
ERROR:
[Magento \ Framework \ Exception \ NoSuchEntityException]请求 找不到商店
前方错误:
Magento \ Framework \ Exception \ NoSuchEntityException:请求的商店是 找不到 /home/discusshop/sites/discusshop.nl/www/vendor/magento/module-store/Model/StoreRepository.php:111 堆栈跟踪:#0 /home/discusshop/sites/discusshop.nl/www/vendor/magento/module-store/Model/StoreManager.php(164): Magento \ Store \ Model \ StoreRepository-> getById('2')#1 /home/discusshop/sites/discusshop.nl/www/var/generation/Magento/Store/Model/StoreManagerInterface/Proxy.php(119): Magento \ Store \ Model \ StoreManager-> getStore('2')#2 /home/discusshop/sites/discusshop.nl/www/vendor/magento/module-store/Model/Resolver/Store.php(29): Magento \ Store \ Model \ StoreManagerInterface \ Proxy-> getStore('2')#3 /home/discusshop/sites/discusshop.nl/www/vendor/magento/framework/App/Config/ScopeCodeResolver.php(49): Magento \ Store \ Model \ Resolver \ Store-> getScope('2')#4 /home/discusshop/sites/discusshop.nl/www/vendor/magento/module-config/App/Config/Source/RuntimeConfigSource.php(82): Magento \ Framework \ App \ Config \ ScopeCodeResolver-> resolve('stores','2') 5 /home/discusshop/sites/discusshop.nl/www/vendor/magento/module-config/App/Config/Source/RuntimeConfigSource.php(58): Magento \ Config \ App \ Config \ Source \ RuntimeConfigSource-> loadConfig()#6 /home/discusshop/sites/discusshop.nl/www/vendor/magento/framework/App/Config/ConfigSourceAggregated.php(40): Magento \ Config \ App \ Config \ Source \ RuntimeConfigSource-> get('')#7 /home/discusshop/sites/discusshop.nl/www/var/generation/Magento/Framework/App/Config/ConfigSourceAggregated/Proxy.php(95): Magento \ Framework \ App \ Config \ ConfigSourceAggregated-> get('')#8 /home/discusshop/sites/discusshop.nl/www/vendor/magento/module-config/App/Config/Type/System.php(98): Magento \ Framework \ App \ Config \ ConfigSourceAggregated \ Proxy-> get()#9 /home/discusshop/sites/discusshop.nl/www/vendor/magento/framework/App/Config.php(139): Magento \ Config \ App \ Config \ Type \ System-> get('default / web / sec ...')#10 /home/discusshop/sites/discusshop.nl/www/vendor/magento/framework/App/Config.php(90): Magento \ Framework \ App \ Config-> get('system','default / web / sec ...')#11 /home/discusshop/sites/discusshop.nl/www/vendor/magento/framework/App/Config.php(103): 的Magento \框架\ APP \ Config->的getValue( '网/安全/使用_...', 'default',NULL)#12 /home/discusshop/sites/discusshop.nl/www/vendor/magento/module-store/Model/HeaderProvider/Hsts.php(48): Magento \ Framework \ App \ Config-> isSetFlag('web / secure / use _...')#13 /home/discusshop/sites/discusshop.nl/www/vendor/magento/framework/App/Response/HeaderManager.php(41): Magento \ Store \ Model \ HeaderProvider \ Hsts-> canApply()#14 /home/discusshop/sites/discusshop.nl/www/vendor/magento/framework/Interception/Interceptor.php(123): 的Magento \框架\ APP \响应\ HeaderManager-> beforeSendResponse(对象(Magento的\框架\ APP \响应\ HTTP \拦截器)) 15 /home/discusshop/sites/discusshop.nl/www/var/generation/Magento/Framework/App/Response/Http/Interceptor.php(117): 的Magento \框架\ APP \响应\ HTTP \ Interceptor-> ___ callPlugins( 'sendResponse', 数组,数组)#16 /home/discusshop/sites/discusshop.nl/www/vendor/magento/framework/App/Http.php(185): Magento \ Framework \ App \ Response \ Http \ Interceptor-> sendResponse()#17 /home/discusshop/sites/discusshop.nl/www/vendor/magento/framework/App/Http.php(156): 的Magento \框架\ APP \ HTTP-> handleDeveloperMode(对象(Magento的\框架\ APP \自举), 对象(Magento \ Framework \ Exception \ NoSuchEntityException))#18 /home/discusshop/sites/discusshop.nl/www/vendor/magento/framework/App/Bootstrap.php(263): 的Magento \框架\ APP \ HTTP-> catchException(对象(Magento的\框架\ APP \自举), 对象(Magento \ Framework \ Exception \ NoSuchEntityException))#19 /home/discusshop/sites/discusshop.nl/www/pub/index.php(37): 的Magento \框架\ APP \ Bootstrap->运行(对象(Magento的\框架\ APP \ HTTP)) 20 {main}
答案 0 :(得分:1)
的Magento \存储\模型\ StoreRepository-> getById(' 2&#39)
您需要查看您创建和删除某些商店的方式。
看起来已经创建了一个带有商店ID 2的stire,后来被删除但由于某种原因遗留了一些痕迹,因此升级代码正在搜索此商店。
建议:查看DB并尝试找到存储ID 2条目的位置并删除(在DB上直接执行操作时要小心)。