-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Fixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseThe issue has been reproduced on latest 2.1 releasebug report
Description
The pagination became incorrect. For example, The pagination would show 10 page when there are only 3 pages of product on product listing page.
Preconditions
Magento version 2.1.2
Steps to reproduce
- Create a frontend plugin for product collection's load function, beforeLoad()
- Add a new addAttributeToFitler() to $subject
- get the value of getSize()
Expected result
- the getSize() should reflect the total in the collection with new attribute filter.
Actual result
- the _totalRecords is not correct for filtered collection. getSize() returns incorrect value.
Investigation:
The total records was pulled from a different model. When I added new attribute filter to the collection, it did not update the search criteria in catalogsearch models. Hence, the total records did not represent the total in the collection.
Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection::_renderFiltersBefore()
Line 347: $this->_totalRecords = $this->searchResult->getTotalCount();
etessari, eddyonboard, avoelkl, economixoffice, weixelbaumer and 7 more
Metadata
Metadata
Assignees
Labels
Fixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseThe issue has been reproduced on latest 2.1 releasebug report