Elasticsuite: Missing required argument $name

Created on 16 Jan 2017  路  7Comments  路  Source: Smile-SA/elasticsuite

Hi,

After installing and configuring then frontend ajax search throws error:

1 exception(s):
Exception #0 (BadMethodCallException): Missing required argument $name of Smile\ElasticsuiteCore\Search\Request\Aggregation\Bucket\Term.

Exception #0 (BadMethodCallException): Missing required argument $name of Smile\ElasticsuiteCore\Search\Request\Aggregation\Bucket\Term.

0 /lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php(82): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Smile\Elasticsu...', Array, Array)

1 /lib/internal/Magento/Framework/ObjectManager/ObjectManager.php(57): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Smile\Elasticsu...', Array)

2 /var/generation/Smile/ElasticsuiteCore/Search/Request/Aggregation/Bucket/TermFactory.php(43): Magento\Framework\ObjectManager\ObjectManager->create('Smile\Elasticsu...', Array)

3 /vendor/smile/elasticsuite/src/module-elasticsuite-core/Search/Request/Aggregation/AggregationFactory.php(58): Smile\ElasticsuiteCore\Search\Request\Aggregation\Bucket\TermFactory->create(Array)

4 /vendor/smile/elasticsuite/src/module-elasticsuite-core/Search/Request/Aggregation/AggregationBuilder.php(91): Smile\ElasticsuiteCore\Search\Request\Aggregation\AggregationFactory->create('termBucket', Array)

5 /vendor/smile/elasticsuite/src/module-elasticsuite-core/Search/Request/Builder.php(157): Smile\ElasticsuiteCore\Search\Request\Aggregation\AggregationBuilder->buildAggregations(Object(Smile\ElasticsuiteCore\Search\Request\ContainerConfiguration), Array, Array)

6 /vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Model/ResourceModel/Product/Fulltext/Collection.php(486): Smile\ElasticsuiteCore\Search\Request\Builder->create(2, 'quick_search_co...', 0, 5, Array, Array, Array, Array, Array)

7 /vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Model/ResourceModel/Product/Fulltext/Collection.php(383): Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection->prepareRequest()

8 /lib/internal/Magento/Framework/Data/Collection/AbstractDb.php(338): Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection->_renderFiltersBefore()

9 /vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Model/ResourceModel/Product/Fulltext/Collection.php(419): Magento\Framework\Data\Collection\AbstractDb->_renderFilters()

10 /app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php(906): Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection->_renderFilters()

11 /app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php(727): Magento\Eav\Model\Entity\Collection\AbstractCollection->load(false, false)

12 /lib/internal/Magento/Framework/Data/Collection.php(820): Magento\Catalog\Model\ResourceModel\Product\Collection->load()

13 /vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Model/Autocomplete/Product/DataProvider.php(114): Magento\Framework\Data\Collection->getIterator()

14 /app/code/Magento/Search/Model/Autocomplete.php(32): Smile\ElasticsuiteCatalog\Model\Autocomplete\Product\DataProvider->getItems()

15 /app/code/Magento/Search/Controller/Ajax/Suggest.php(44): Magento\Search\Model\Autocomplete->getItems()

16 /var/generation/Magento/Search/Controller/Ajax/Suggest/Interceptor.php(24): Magento\Search\Controller\Ajax\Suggest->execute()

17 /lib/internal/Magento/Framework/App/Action/Action.php(102): Magento\Search\Controller\Ajax\Suggest\Interceptor->execute()

18 /lib/internal/Magento/Framework/Interception/Interceptor.php(58): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))

19 /lib/internal/Magento/Framework/Interception/Interceptor.php(138): Magento\Search\Controller\Ajax\Suggest\Interceptor->___callParent('dispatch', Array)

20 /lib/internal/Magento/Framework/Interception/Interceptor.php(153): Magento\Search\Controller\Ajax\Suggest\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))

21 /var/generation/Magento/Search/Controller/Ajax/Suggest/Interceptor.php(39): Magento\Search\Controller\Ajax\Suggest\Interceptor->___callPlugins('dispatch', Array, Array)

22 /lib/internal/Magento/Framework/App/FrontController.php(55): Magento\Search\Controller\Ajax\Suggest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))

23 /lib/internal/Magento/Framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))

24 /lib/internal/Magento/Framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)

25 /app/code/Magento/Store/App/FrontController/Plugin/RequestPreprocessor.php(94): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))

26 /lib/internal/Magento/Framework/Interception/Interceptor.php(135): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))

27 /app/code/Magento/PageCache/Model/App/FrontController/BuiltinPlugin.php(69): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))

28 /lib/internal/Magento/Framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))

29 /lib/internal/Magento/Framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))

30 /var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, NULL)

31 /lib/internal/Magento/Framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))

32 /lib/internal/Magento/Framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()

33 /pub/index.php(37): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))

34 {main}

bug

All 7 comments

Same problem here!

I also found that the error happens only when you set some attribute as "Display in autocomplete" = yes

Hi @RaunoVV, @MauroNigrele

Is the attribute concerned attribute searchable (Used in search ?). If not you should try to make it searchable and reindex. If this workaround is fine we will release a patch to avoid such a combination in the attribute config.

Hi @afoucret,

Yes attribute is "searchable" I've attached a capture of the attribute configuration:
screen shot 2017-01-16 at 12 17 20

OK I see.
The attribute should be filterable (in search or in layered navigation). We are building a facet to achieve the feature. Can you test it and confirm ? If it is working we will issue a patch.

You can test the patch available in the branches 2.3.x and master.
It will be part of the next minor release (2.3.1)

@afoucret Perfect that was the problem, It's working now!!!

Also... thanks for such incredible work guys!

This should also fix #307

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  4Comments

DanieliMi picture DanieliMi  路  5Comments

rvitaliy picture rvitaliy  路  3Comments

JonathanBBD picture JonathanBBD  路  3Comments

vahir2016 picture vahir2016  路  4Comments