1

I have updated my Magento from 2.3.0 to 2.4.2, and seems to work fine, but one thing, if I go in any category page, I see no products, and even if I search for, I see no results. On the homepage there is the latests products grid, and I can see those. When I update the magento version, I have disabled elastic search and installed this one through those commands:

/usr/local/php73/bin/php-cli bin/magento module:disable {Magento_Elasticsearch,Magento_InventoryElasticsearch,Magento_Elasticsearch6,Magento_Elasticsearch7}

/usr/local/php73/bin/php-cli /home/u129-kntmbqtlx5of/composer.phar require swissup/module-search-mysql-legacy --prefer-source --ignore-platform-reqs

/usr/local/php73/bin/php-cli bin/magento module:enable Swissup_SearchMysqlLegacy Swissup_Core

/usr/local/php73/bin/php-cli bin/magento setup:upgrade

/usr/local/php73/bin/php-cli bin/magento setup:di:compile

/usr/local/php73/bin/php-cli bin/magento indexer:reindex

/usr/local/php73/bin/php-cli bin/magento cache:clean

/usr/local/php73/bin/php-cli bin/magento cache:flush

but still nothing, I don't see the products in categories, any suggestion?

6

4 Answers 4

1

Magento 2.4.x switches to using Elasticsearch as management of category pages.

Try reindexing all the indexes.

bin/magento indexer:reset
bin/magento indexer:reindex

Make sure your Elasticsearch is connected before you do this.

Also check if you had any overrides for Catalog page filters. Many people used MySQL sorting to sort the pages - this no longer works and overrides that did that need to be removed.

UPDATE:

Looks like OP is using swissapps plugin that goes back to MySQL search.

@alexcr have you tried going through the manual?

https://docs.swissuplabs.com/m2/extensions/search-mysql-legacy/

php bin/magento setup:install --disable-modules=Magento_InventoryElasticsearch,Magento_Elasticsearch7,Magento_Elasticsearch6,Magento_Elasticsearch

install module, then run:

php bin/magento module:enable Magento_Elasticsearch Magento_Elasticsearch6 Magento_Elasticsearch7 Magento_InventoryElasticsearch

Then check if its running:

bin/magento config:show catalog/search/engine

If you need to change the engine:

bin/magento config:set catalog/search/engine 'lmysql'
1
  • no luck ! i can't solve my issue
    – matinict
    Jul 18, 2022 at 13:54
1

After hours of searching and reinstalling a vanilla version of 2.4.5 here is the fix.

Go to stores->configuration->catalog->catalog-> Allow All Products per Page Set this to NO

bin/magento indexer:reindex bin/magento cache:flush

Done.

0

kindly check your elastic search connectivity on 9200 port using this command from ssh

curl localhost:9200

it causes due to elastic search unavailability, if above command giving connectivity error so install elastic search on your server.

https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-elasticsearch-on-ubuntu-18-04

0

I had the same issue after upgrading to 2.4.2 and found this solution corrected the issues in the database.

https://magento.stackexchange.com/a/322623/58072

Here is the code I used.

SELECT *
FROM catalog_eav_attribute cea 
JOIN eav_attribute ea
  ON ea.attribute_id = cea.attribute_id 
  AND backend_type IN ('text', 'varchar')
WHERE 
  cea.is_filterable = 1 OR cea.is_filterable_in_search = 1;

UPDATE catalog_eav_attribute cea 
JOIN eav_attribute ea
  ON ea.attribute_id = cea.attribute_id 
  AND backend_type in ('text', 'varchar')
SET 
  cea.is_filterable = 0, cea.is_filterable_in_search = 0
WHERE 
  cea.is_filterable = 1 OR cea.is_filterable_in_search = 1;

Then clear caches and reindex. Try load a different category page to avoid browser cache issues.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.