My category grid works fine, page 1 shows products 1-100, page 2 shows 101-200 and so on.
However, on the search results page, all results are listed on the first page, so page 1 shows results 1-289 for example. And the pager information next to the number of pages says "PRODUCTS 1 TO 289 OF 289". The number of pages is calculated and displayed correctly.
When I investigate the collection I can see that something's wrong:
echo $collection->getPageSize(); // 100 echo $collection->getCurPage(); // 1 echo $collection->count(); // 138 -> This should also be set to 100, as the current page is 1 and the page size is 100..
And looking at the query for the collection, I see that it's missing the
LIMIT 100 right at the end of the query.
Does anybody know what could be causing this?