Skip to content

Magento 2.2.2 layered navigation shows also out of stock products #20593

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

Closed
LouNik1984 opened this issue Jan 24, 2019 · 21 comments
Closed

Magento 2.2.2 layered navigation shows also out of stock products #20593

LouNik1984 opened this issue Jan 24, 2019 · 21 comments
Assignees
Labels
Component: LayeredNavigation Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed

Comments

@LouNik1984
Copy link

I know there are already closed issues for this problem but none has worked for me.

Preconditions (*)

magento 2.2.2 on ubuntu 16.04, apache2, php 7.1.26, mysql 5.7.25, with configurable products with a text swatch attribute (eg: size) which is filterable with results in layered navigation. Option "show out of stock products" is set to NO.

Steps to reproduce (*)

  • open a configurable product from backend, go to configuration section and set an associated simple product (eg: size = 42) to qty = 0 and out of stock, then save the product, clean cache and reindex
  • go to category page in frontend to see list of products, then filter the list with the attribute you set out of stock (eg: size 42)

Expected result (*)

Search should list only configurable product that have size 42 available (in stock)

Actual result (*)

Search shows also the product which has the size 42 out of stock among the product which have that size available

Notes

I have a staging environment with mysql 5.6 as only difference from the production environment and here the layered navigation works as expected.

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Jan 24, 2019
@magento-engcom-team
Copy link
Contributor

Hi @LouNik1984. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento-engcom-team give me $VERSION instance

where $VERSION is version tags (starting from 2.2.0+) or develop branches (for example: 2.3-develop).
For more details, please, review the Magento Contributor Assistant documentation.

@LouNik1984 do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
  • no

@GovindaSharma GovindaSharma self-assigned this Jan 24, 2019
@magento-engcom-team
Copy link
Contributor

Hi @GovindaSharma. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • 6. Add label Issue: Confirmed once verification is complete.

  • 7. Make sure that automatic system confirms that report has been added to the backlog.

@GovindaSharma
Copy link
Contributor

@magento-engcom-team give me 2.2-develop instance

@magento-engcom-team
Copy link
Contributor

Hi @GovindaSharma. Thank you for your request. I'm working on Magento 2.2-develop instance for you

@magento-engcom-team
Copy link
Contributor

Hi @GovindaSharma, here is your Magento instance.
Admin access: https://i-20593-2-2-develop.instances.magento-community.engineering/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.

@GovindaSharma GovindaSharma added Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Component: LayeredNavigation labels Jan 24, 2019
@amol2jcommerce amol2jcommerce self-assigned this Jan 24, 2019
@magento-engcom-team
Copy link
Contributor

Hi @amol2jcommerce. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • 6. Add label Issue: Confirmed once verification is complete.

  • 7. Make sure that automatic system confirms that report has been added to the backlog.

@amol2jcommerce amol2jcommerce removed their assignment Jan 24, 2019
@amol2jcommerce
Copy link
Contributor

Hi @LouNik1984 Not reproduce 2.2-develop

@amol2jcommerce amol2jcommerce added the Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch label Jan 24, 2019
@LouNik1984
Copy link
Author

I have two environments that are almost identical. The only difference I have on those two environments is the mysql version. On the environment with mysql 5.6 the layered navigation works properly. On the environment with mysql 5.7 the layered navigation shows the described issue. What mysql version had the magento instance that was used to try and reproduce the issue?

@ghost ghost self-assigned this Jan 25, 2019
@magento-engcom-team
Copy link
Contributor

Hi @engcom-backlog-nazar. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • 6. Add label Issue: Confirmed once verification is complete.

  • 7. Make sure that automatic system confirms that report has been added to the backlog.

@ghost ghost removed the Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch label Jan 25, 2019
@ghost
Copy link

ghost commented Jan 25, 2019

Hi @LouNik1984 thak you for you report, seesm like this already fixed in 2.2-develop branch, i'm tested on
mysql
selection_293

@ghost ghost closed this as completed Jan 25, 2019
@LouNik1984
Copy link
Author

"seesm like this already fixed in 2.2-develop branch"

so how can I fix mine?

@ghost
Copy link

ghost commented Jan 25, 2019

@LouNik1984 give me 10 minutes i will try find related commit

@ghost
Copy link

ghost commented Jan 25, 2019

@LouNik1984 #13417, #12063 ,

@LouNik1984
Copy link
Author

Unfortunately those commit didn't help me, so I created a clone of my buggy version on the same server to further test and finally I found the root of the issue: elasticsearch. If I switch to mysql as search engine via magento backend configuration and clear cache (magento cache:clean) then the layered navigation works as expected. If I switch back to elasticsearch and clear cache (again with cache:clean) then the issue is present again.

@ghost
Copy link

ghost commented Jan 25, 2019

@LouNik1984 ok, which version elasticsearch you're used ?

@LouNik1984
Copy link
Author

I'm using aws elasticsearch service, version 5.3.2

@ghost
Copy link

ghost commented Jan 25, 2019

@LouNik1984 i'm will retest with elasticsearch

@LouNik1984
Copy link
Author

Thank you very much, sorry for my previous mistake

@anatolij-p
Copy link

@LouNik1984
Can you provide some more info on did you solve the Elastic Search issue?
I'm having the same problem.

@LouNik1984
Copy link
Author

@anatolij-p
I'm sorry but I didn't find a solution to solve it

@mikehenze
Copy link

Please reopen.
This issue still persist even with m2.3.5-p2 and elasticsearch 7

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: LayeredNavigation Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed
Projects
None yet
Development

No branches or pull requests

6 participants