Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

collection getSize doesn't work properly with plugins #9195

Closed
ghost opened this issue Apr 10, 2017 · 1 comment
Closed

collection getSize doesn't work properly with plugins #9195

ghost opened this issue Apr 10, 2017 · 1 comment
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release

Comments

@ghost
Copy link

ghost commented Apr 10, 2017

Preconditions

  1. Magento 2.1.5
  2. PHP 7 MySQL 5.6.35

Steps to reproduce

  1. Create a dependency injection on a product collection as here http://magento.stackexchange.com/questions/164574/collection-addattributetofilter-works-if-cache-disabled-but-not-if-enabled
  2. view the results on the category page
  3. The pagination and total count of products is wrong but it shows the right products

Expected result

  1. The pagination and total amount of products returned should reflect the actual sql returned after the plugin

Actual result

  1. https://i.gyazo.com/0c90b7bcaced2de588ee68066bfdb591.png
    As you can see there isn't 406 items but one

Commenting out these lines in framework/Data/Collection/AbstractDb.php makes it work:
https://i.gyazo.com/1ffcab817aea8bf89c54e6d59cbd06e5.png

Others have reported many times in magento stack exchange of collection size and toolbar count and pagination not matching so this is a very common issue.

@magento-engcom-team magento-engcom-team added G1 Passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed and removed G1 Passed labels Sep 5, 2017
@magento-engcom-team magento-engcom-team added the Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed label Oct 23, 2017
@magento-engcom-team
Copy link
Contributor

@atrixtech, thank you for your report.
The issue is already fixed in develop branch, 2.2.0

@magento-engcom-team magento-engcom-team added 2.1.x Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release labels Oct 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release
Projects
None yet
Development

No branches or pull requests

1 participant