4

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
asked Sep 28, 2018 at 18:06
11
  • Have you added any module ? Commented Sep 28, 2018 at 18:10
  • @AdityaShah I installed this theme themeforest.net/item/artfurniture-responsive-magento-2-theme/… Commented Sep 28, 2018 at 19:14
  • Please run setup:upgrade command Commented Sep 28, 2018 at 19:19
  • @AdityaShah Message: "Nothing to import." Not change, same error. Commented 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. Commented Sep 29, 2018 at 18:39

2 Answers 2

4

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
1

Had this issue as well. It got fixed in 2.2.6 release.

enter image description here

answered Nov 7, 2018 at 17:57

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.