Pagination works when I navigate to a page, but when I search, it doesn't. This is inconvenient when there are 100 results, but when there are 1000+, eventually it just times out and throws a 524 error.

How can I fix this?

This seems to be a theme issue. If I switch to Luma, this problem goes away.

Running Magento 2.4.1 and Elasticsearch 7.6

有帮助吗?

解决方案

After messing around with this for a bit I think I found the issue. I'm by no means an expert or know much about Magento 2. I'm also on Magento 2.4.0 and on Porto 3.2.5(One update back). The Issue is with the results template file in the Porto Theme.

Path: App/design/frontend/Smartwave/porto/Magento_CatalogSearch/templates/result.phtml

Comparing it to the default theme result.phtml.

Path: vendor/magento/module-catalog-search/view/frontend/templates/result.phtml

I honestly see no big difference.

The new one uses a variable to call on the Product list block, but seems like they should work the same way, but there is a comment note showing "This changes need to valid applying filters and configuration before search process is started"

So it sounds like it needs to load the product list before the results to get the valid configuration.

So simple fix!! Just replace result.phtml with the default one (Or just delete your theme one and it loads the default one). Everything in mine seemed to work perfect after I overrode the porto result.phtml. Hope this helps!

许可以下: CC-BY-SA归因
scroll top