3

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

4
  • Kindly disable all the third party modules and check. Nov 24, 2020 at 4:00
  • I have quite a few modules, but the big culprit that I suspected was Mirasvit search. I disabled all things related to Mirasvit, and still have the same issue
    – web master
    Nov 24, 2020 at 4:49
  • Any luck on this issue? Nov 30, 2020 at 9:07
  • No. Still stuck with this
    – web master
    Nov 30, 2020 at 16:42

2 Answers 2

11
+50

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!

1
  • 1
    I was seeing this problem too, and can confirm that using the core result.phtml template fixes the problem
    – paj
    Jan 11, 2021 at 16:18
2

I had the same problem. Don't need replace porto file result.phtml.

You just need to move this code:

$productList = $block->getProductListHtml();

to the top in the file

1
  • I found the answer from @Darin Minard to work. I just removed the Porto file
    – web master
    Jul 7, 2021 at 15:36

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.