Question

I've a fresh install of Magento 2.4.0 on ubuntu 20.04 installed from CLI, downloaded with Composer.

I get this error while trying to reindex the catalog_search index :

Catalog Search index process unknown error: Missing required argument $engines of Magento\Search\Model\EngineResolver.

Also, my catalog/catalog tab in admin panel is empty for the scope default config so I can't set the elasticsearch engine from the UI. In the core_config_data, there was no catalog/search/engine, so I tried to set a new one with elasticsearch7 or mysql but neither worked.

I precise that I've a working elasticsearch 7.x on this new server, with no credentials.

It seems that the elasticsearch related config are not set properly, and I can't figure out why no option are visible in the default scope admin panel for the catalog/catalog tab...

An idea ?

Was it helpful?

Solution 2

So, If anyone can test Aphroz's answer, Do it. It sounds to be a good solution.

Personaly, I solved this problem by removing all files in my magento directory, cleaning the database and resintalling the whole thing to get a new fresh install.

The problem was that I installed elasticsearch 7 AFTER installing Magento 2.4.0, as I used to do with previous version of Magento.

If you get the same error message as I get, please, considere installing eslasticsearch then disabling and enabling eslasticSearch magento module, it may restore all related config. Otherwise... do a fresh installation again like I did.

OTHER TIPS

You need to re-activate the ElasticSearch modules if you have de-activated them. ElasticSearch is required to run Magento 2.4.

Edit:

From Magento website: "As of Magento 2.4.0, Elasticsearch 7.6.x is required for all installations."

If you don't want to use Elasticsearch, you need to implement another catalog search solution as MySQL search has been removed, from the 2.4. changelog:

"The MySQL search engine has been removed from Magento 2.4.0 and replaced as the default search engine with Elasticsearch. Elasticsearch provides superior search capabilities as well as catalog performance optimizations. All merchants must have Elasticsearch to install and deploy Magento 2.4.0."

If you're not interested to use elastic search in magneto 2.4.0 or above version then you can use below mentioned module ("The Default MySQL search engine has been removed from Magento 2.4.0")

https://github.com/shafeelsha/module-search-mysql-legacy

For maintainers

cd <magento_root>
composer config repositories.swissup composer https://docs.swissuplabs.com/packages/
composer require swissup/module-search-mysql-legacy --prefer-source --ignore-platform-reqs
bin/magento module:enable Swissup_SearchMysqlLegacy Swissup_Core
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento indexer:reindex catalogsearch_fulltext
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top