It is a fatal error that happens when I open the search or try to open any category.
I'm using magento 2.2.5 with apache 2.4 and php 7.1
Fatal error: Uncaught Error: Cannot instantiate interface
Magento\Framework\Search\Request\IndexScopeResolverInterface in
/var/www/html/magento2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:111
Stack trace: #0
/var/www/html/magento2/vendor/magento/framework/ObjectManager/Factory/Compiled.php(108):
Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Framewo...',
Array) #1
/var/www/html/magento2/vendor/magento/framework/ObjectManager/ObjectManager.php(70):
Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\\Framewo...')
#2 /var/www/html/magento2/vendor/magento/module-catalog-search/Model/Search/FilterMapper/ExclusionStrategy.php(90):
Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Framewo...')
#3 /var/www/html/magento2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(111):
Magento\CatalogSearch\Model\Search\FilterMapper\ExclusionStrategy->__construct(Object(Magento\Framework\App\ResourceConnection\Interceptor),
Object(Magento\Sto in
/var/www/html/magento2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php
on line 111
Question Solved:
A co-worker helped me solve the problem. I inserted this line into the file "app/etc/di.xml":
<preference for="Magento\Framework\Search\Request\IndexScopeResolverInterface" type="Magento\Framework\Indexer\ScopeResolver\IndexScopeResolver"/>
Teja Bhagavan Kollepara
3,8275 gold badges33 silver badges69 bronze badges
-
Have you added any module ?Aditya Shah– Aditya Shah2018年09月28日 18:10:45 +00:00Commented Sep 28, 2018 at 18:10
-
@AdityaShah I installed this theme themeforest.net/item/artfurniture-responsive-magento-2-theme/…Felipe Souza Melo– Felipe Souza Melo2018年09月28日 19:14:45 +00:00Commented Sep 28, 2018 at 19:14
-
Please run setup:upgrade commandAditya Shah– Aditya Shah2018年09月28日 19:19:44 +00:00Commented Sep 28, 2018 at 19:19
-
@AdityaShah Message: "Nothing to import." Not change, same error.Felipe Souza Melo– Felipe Souza Melo2018年09月28日 19:46:06 +00:00Commented Sep 28, 2018 at 19:46
-
I meant that run that command after uninstalling that so we can be sure about bug. Is it generation because of theme or not.Aditya Shah– Aditya Shah2018年09月29日 18:39:37 +00:00Commented Sep 29, 2018 at 18:39
2 Answers 2
Missing di.xml preference issue.
app/etc/di.xml
<preference for="Magento\Framework\Search\Request\IndexScopeResolverInterface" type="Magento\Framework\Indexer\ScopeResolver\IndexScopeResolver"/>
answered Oct 9, 2018 at 20:24
Aditya Shah
7,6813 gold badges41 silver badges79 bronze badges
Had this issue as well. It got fixed in 2.2.6 release.
default