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

Swatches no longer crossed out after indexes invalidated and reindexed #34127

Closed
1 of 4 tasks
dphilipps opened this issue Sep 20, 2021 · 37 comments
Closed
1 of 4 tasks

Swatches no longer crossed out after indexes invalidated and reindexed #34127

dphilipps opened this issue Sep 20, 2021 · 37 comments
Assignees
Labels
Area: Product Component: ConfigurableProduct Issue: needs update Additional information is require, waiting for response Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: done Reported on 2.4.x Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch

Comments

@dphilipps
Copy link

dphilipps commented Sep 20, 2021

Preconditions (*)

  1. Magento 2.4.3-develop
  2. Issue also exists in official 2.4.3 release

Steps to reproduce (*)

  1. In admin, go to System->Index Management
  2. Select all indexes, followed by Actions->Update by Schedule->Submit
  3. On front end, go to product /juno-jacket.html
  4. Add 100 of XL/Green to basket and proceed to checkout and place order to ensure stock becomes fully sold out
  5. Visit product page again and click on XL option
  6. Green swatch is correctly crossed-out (if not, repeat from step 4 with a different option -see comments below)
  7. In admin, go to System->Index Management
  8. Take note of Updated time stamp
  9. Select all indexes, followed by Actions->Invalidate Index->Submit
  10. Refresh as necessary and wait for updated time stamp to change (compared to point 8 above) meaning indexes have reindexed
  11. On front end, go to product /juno-jacket.html and click on XL option
  12. Green swatch is no longer crossed out

Expected result (*)

  1. The green swatch should still be crossed out after the index has been invalidated and reindexed
    image

Actual result (*)

  1. The green swatch IS NOT crossed out after the index has been invalidated and reindexed. The unsalable product can be selected and 'Add to Cart' button pressed. However 'The requested qty is not available' message is displayed after adding to cart
    image

Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • [] Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
@m2-assistant
Copy link

m2-assistant bot commented Sep 20, 2021

Hi @dphilipps. 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 give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@dphilipps
Copy link
Author

@magento give me 2.4-develop instance

@magento-deployment-service
Copy link

Hi @dphilipps. Thank you for your request. I'm working on Magento instance for you.

@dphilipps
Copy link
Author

dphilipps commented Sep 20, 2021

Occasionally the sold-out product is not initially crossed-out after placing an order as expected. There is another ticket open which covers this #33799 however I assume it is actually a manifestation of the issue described in this ticket and caused by indexing and the inconsistency down to the timing of the index update after purchase (only a guess though).

@dphilipps
Copy link
Author

I have verified the reproduction steps with the above instance.

@engcom-November engcom-November self-assigned this Sep 20, 2021
@m2-assistant
Copy link

m2-assistant bot commented Sep 20, 2021

Hi @engcom-November. 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.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.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. Add label Issue: Confirmed once verification is complete.

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

@engcom-November
Copy link
Contributor

engcom-November commented Sep 23, 2021

Verified the issue on Magento 2.4-develop branch and the behavior is different:

Steps performed:

  1. Created a configurable product with options. (used color attribute - visual swatch)
  2. Front-end - Selected one option(Red) with all quantity and placed order - No issue
  3. Front-end - Product Details page - Red Swatch is not crossed out
  4. Click on Red Swatch and Add to Cart
    Error: "The requested qty is not available" error message is displayed to the user.
  5. In admin, go to System->Index Management
    Select all indexes, followed by Actions->Invalidate Index->Submit
  6. Reindex and clear cache from CLI
    php bin/magento indexer:reindex
    php bin/magento cache:flush
  7. Front-end - Product Details page - Red Swatch is not crossed out
  8. Click on Red Swatch and Add to Cart
    Error: "The requested qty is not available" error message is displayed to the user.
    User is not able to place order before or after reindexing.
    @dphilipps , can you please recheck the issue on Magento 2.4-develop branch and provide missing steps if any if the issue is still reproducible.
    Thank you.
    image

@engcom-November engcom-November added Component: ConfigurableProduct Issue: needs update Additional information is require, waiting for response Reported on 2.4.x Indicates original Magento version for the Issue report. labels Sep 23, 2021
@engcom-November engcom-November added the Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch label Sep 23, 2021
@dphilipps
Copy link
Author

It looks as though you didn't complete steps 1 & 2 according to your write up?

  1. In admin, go to System->Index Management
  2. Select all indexes, followed by Actions->Update by Schedule->Submit

The challenge with this issue is that there seems to possibly be a different bug which is preventing the swatch being crossed out initially (after purchasing all). This bug (the state of the swatch reverting) obviously cannot be reproduced without the swatch first being crossed out.

Can I kindly ask, when after the indexers are changed to scheduled (1 & 2 above), if a swatch is not crossed out, please purchase another option (buying all stock, typically 100 items) and try again. If often works on subsequent attempts.

Once the crossed out swatch has been obtained, then my steps 7 onwards can be followed to reproduce the issue.

@dphilipps
Copy link
Author

@magento give me 2.4-develop instance

@magento-deployment-service
Copy link

Hi @dphilipps. Thank you for your request. I'm working on Magento instance for you.

@dphilipps
Copy link
Author

dphilipps commented Sep 23, 2021

Hi @engcom-November
To confirm, I have followed my reproduction steps again on a new instance and at step 6, I needed to repeat the purchased for a second option. After the second purchase (same colour in different size) both swatches became crossed out correctly. I then repeated a third purchase which worked as well.

Following my steps from 7 then reproduced the issue successfully.

PLEASE NOTE After the indexes have been invalidated, you must wait for cron to run again and reindex before going back to check the status of the swatch -hence checking the timestamps.

I note you followed slightly different steps to me. I recommend following my steps exactly and purchasing the demo products, this will also save time over creating a configurable.

Many thanks

@engcom-November
Copy link
Contributor

@magento give me 2.4-develop instance

@magento-deployment-service
Copy link

Hi @engcom-November. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

Hi @engcom-November, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

@engcom-November
Copy link
Contributor

Verified the issue on Magento 2.4-develop branch and the issue is reproducible with below Steps performed:
Steps to reproduce:
Create a configurable product with options. (used color attribute - visual swatch) / Or Use sample data /juno-jacket.html which has options.
In admin, go to System->Index Management
Select all indexes, followed by Actions->Update by Schedule->Submit. (Make sure cron jobs are running)
Front-end: Add qty - 100 of XL/Green to basket and proceed to checkout and place order to ensure stock becomes fully sold out
Visit product page again and click on XL option
Reindex and Clear cache
Issue 1: Green swatch is not correctly crossed-out
Select Same color again and different size ex: M and Place Order with all quantity - 100
Go to Product Details page and select XL or M
There is no issue now - Green Swatch is crossed out now.
System->Index Management - Select All - Actions-> Invalidate Index
Wait till all indexers are reindexed
Refresh Product Details page - @dphilipps . No issue. Green Swatch is correctly crossed out even after reindexing.

Confirming this issue for Issue 1 mentioned here and inconsistent behavior while adding out of stock product to cart if the swatch is not crossed out.
image
image
For newly created products - Error: "The requested qty is not available" error message is displayed to the user.

@engcom-November engcom-November added Area: Product Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch labels Sep 27, 2021
@m2-community-project m2-community-project bot removed the Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch label Sep 27, 2021
@engcom-November engcom-November added the Issue: needs update Additional information is require, waiting for response label Sep 28, 2021
@engcom-November engcom-November added the Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch label Sep 28, 2021
@dphilipps
Copy link
Author

Thanks for the video - you are following the right steps. The one difference is the environment. I see you are working on a local instance, but have you tried the steps using a 2.4-develop instance here? That is what I am using to reproduce the problem and it works every time. Could you try that and let me know how you get on please?

@dphilipps
Copy link
Author

@magento give me 2.4-develop instance

@magento-deployment-service
Copy link

Hi @dphilipps. Thank you for your request. I'm working on Magento instance for you.

@dphilipps
Copy link
Author

Hi @engcom-November
Here is a video showing my reproduction steps on the above instance from the magento-deployment-service. As you'll see the swatch is no longer crossed after the indexes are invalidated and rebuilt.

https://www.loom.com/share/70c277bc1521477cb09c0c91d5a68231

Please let me know if any questions

Thanks
Dave

@engcom-November engcom-November self-assigned this Sep 29, 2021
@m2-community-project m2-community-project bot removed the Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch label Sep 29, 2021
@engcom-November
Copy link
Contributor

@magento give me 2.4-develop instance

@magento-deployment-service
Copy link

Hi @engcom-November. Thank you for your request. I'm working on Magento instance for you.

@github-jira-sync-bot github-jira-sync-bot added the Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. label Oct 5, 2021
@dphilipps
Copy link
Author

Hi @engcom-November
Did you manage to reproduce the issue OK in the end using the deployment service? What are the next steps?
Thanks
Dave

@dphilipps
Copy link
Author

@engcom-November Why does this issue still have a 'needs update' label whilst it is already 'in development' in High Priority Backlog? Just checking nothing further is needed from me?

@engcom-Alfa
Copy link
Contributor

This looks duplicate ticket of the Issue. Hence closing the ticket.
For any further follow-up, please look into this ISSUE.

@dphilipps
Copy link
Author

@engcom-Alfa
Whilst sounding similar and having a similar effect, this is actually a different issue with a different use-case.

This issue occurs when a manual reindex is done, or indexes invalidated via admin, causing a reindex. This reverts/resets the salabililty data which is set by the inventory.reservations.updateSalabilityStatus consumer when a product sells out.

The related bug #33799 describes how the product is not being crossed out (becoming unsalable) immediately after placing an order when a product comes sold out. This bug (34127) manifests itself when a product is already successfully crossed out, and is in fact a precondition of this bug.

Please can you reopen this bug?

Let me know if you need any more info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Product Component: ConfigurableProduct Issue: needs update Additional information is require, waiting for response Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: done Reported on 2.4.x Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch
Projects
Archived in project
Development

No branches or pull requests

4 participants