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

Visibility is not respected by layered nav counts #5670

Closed
rhoerr opened this issue Jul 15, 2016 · 16 comments
Closed

Visibility is not respected by layered nav counts #5670

rhoerr opened this issue Jul 15, 2016 · 16 comments
Assignees
Labels
bug report Component: Catalog Fixed in 2.1.x The issue has been fixed in 2.1 release line 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 not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@rhoerr
Copy link

rhoerr commented Jul 15, 2016

Steps to reproduce

  1. Have a category set up with layered navigation.
  2. Set one of that category's products visibility to "Search" (not visible on category directly).
  3. Browse to the category
  4. Filter the category by an attribute assigned to the product edited in step 2.

Expected result

  1. Results count in pagination and layered navigation will match the number of products displayed.

Actual result

  1. Results count will include products set to not visible on categories. The actual product list will not, creating a discrepancy.

2016-07-15_155136

Technical Info

I traced the issue back to \Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection::_renderFiltersBefore() (this is where $this->_totalRecords is set, from the search result). The search result returns 14 entity IDs matching the layered navigation criteria. The actual product list load ($this, in that class context) loads products in the category matching those results, with some other filters.

I took the product list collection query, added the entity_id results explicitly, and then picked out constraints to find the difference. Visibility was it: There are 5 set to visibility 4 (the number of actual results shown), and 9 set to 3 (search-only), for a total of 14 (the total results count shown above).

2016-07-15_155233

Best guess is that use of a search results object in the context of layered navigation is making Magento think 'search!' and ignore that it's actually on a category.

Issue occurs on both 2.0.6 and 2.1.0.

@bijalbhavsar
Copy link

We are facing exactly same issue with toolbar. Is there any solution for this issue?

@ps202
Copy link

ps202 commented Sep 8, 2016

Same here...
Workaround?

@mombrea
Copy link

mombrea commented Sep 28, 2016

+1
snip_20160928154259

@tkacheva tkacheva added Component: Catalog Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development labels Sep 29, 2016
@tkacheva
Copy link

Thanks for reporting the issue. Here is the public PR #6035 but seems to be stuck
Internal issue MAGETWO-59127

@shuaiZend
Copy link

shuaiZend commented Nov 2, 2016

+1:
2.1.2,
2.1.3,
2.0.11

@shuaiZend
Copy link

@dmitry-fedyuk

@shuaiZend
Copy link

fixed #7968

@dchaykas
Copy link

dchaykas commented Feb 1, 2017

@shuaiZend I'm running into the same issue. Just updated to 2.1.3, ran "setup:upgrade", "di:compile", "indexer:reindex", "c:f" and the problem still persists.

Is there anything else to fix this issue? Thanks.

@surfer190
Copy link

surfer190 commented Apr 4, 2017

@shuaiZend Not fixed...It is actually a completely different problem. That issue is the 500 product limit per category.

@mombrea
Copy link

mombrea commented Apr 19, 2017

This issue persists in Magento 2 CE 2.1.5

@tuango-magento
Copy link

This issue persists in Magento 2 EE 2.1.6

@mzenner1
Copy link

Issue is still present on 2.1.7. Please fix this guys. What's the point of allowing us to set a product's visibility to "Search" only if the toolbar pagination and count totals still see it on category pages?? I hope you are aware of this issue

@mzenner1
Copy link

I'm responding to my own post from just above. It just occurred to me that if a product is set to be visible in "Search" only, it does not need to be in a category. The pagination issue can be fixed by simply untagging the search only products from all categories.

@onepack
Copy link

onepack commented Jul 23, 2017

I tried the fix/ workaround from #6035 but without any luck.
The results are the same.
Anybody?

@magento-engcom-team magento-engcom-team added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report Component: Catalog Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed labels Sep 11, 2017
@nelero
Copy link

nelero commented Oct 1, 2017

still buggy in 2.1.9, even without filtering layer category.
3 products in "search" visibilty, 5 in "catalog search" visibility. Magento should display the label "5 products".
Sum from filters is equal to 5, but on the top of the product list, still "8 products".

@magento-engcom-team magento-engcom-team added Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Fixed in 2.1.x The issue has been fixed in 2.1 release line 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 labels Oct 17, 2017
@magento-engcom-team magento-engcom-team added the Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed label Oct 17, 2017
@magento-engcom-team
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Component: Catalog Fixed in 2.1.x The issue has been fixed in 2.1 release line 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 not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests