Skip to content

M2.2: Scheduled reindex of products does not affect associated categories #18335

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
NicoSiebler opened this issue Oct 2, 2018 · 8 comments
Closed
Labels
Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed

Comments

@NicoSiebler
Copy link

Preconditions

  1. Magento 2.2.x (any version up to 2.2.6)
  2. System environment independent
  3. Shop with categories and product associations
  4. Indexing mode schedule (php bin/magento indexer:set-mode schedule)
  5. Full Page Cache enabled (php bin/magento cache:enable full_page)
  6. Categories should not display out of stock products
  7. Independent of customer status on the storefront

Steps to reproduce

  1. Navigate to a category of choice with directly associated products visible
  2. Make sure it's in the full page cache by reloading
  3. Note a product from this category
  4. Go to the admin backend and edit the noted product (pick the parent if it's a composite product, alternatively follow the next steps for all children which yields the same behaviour)
  5. Set the stock status to "Out of stock" and save the product
  6. Make sure the indexing cronjobs ran (see mview_state versions and _cl tables) or trigger it manually (php bin/magento cron:run --group=index --bootstrap=standaloneProcessStarted=1)
  7. See on the storefront that the category page cache was automatically removed by reloading it as expected, the product is not visible anymore
  8. Set the product stock status back to "In stock" and save the product on the admin backend
  9. Again, make sure the indexing cronjobs ran

Expected result

  1. The product along with their tags were removed from the cache, reproducible by reloading the picked category and anything is up to date
  2. The associated categories of the product along with their tags were removed from the cache, reproducible by reloading the picked category and anything is up to date

Actual result

  1. The product along with their tags were removed from the cache, reproducible by reloading the picked category and anything is up to date
  2. The associated categories of the product along with their tags were not removed from the cache

The cache has to be purged manually to take effect
This is a very problematic behaviour if we want to work with the scheduling mode. This means the cache always has to be cleaned manually if things change on category pages not carrying the product cache tags. I assume the same behaviour is present with new category product associations, but can't say for sure yet.

Note

  1. This problem occurs when the product cache tags are not present on the categories yet, that's why I included out of stock and in stock to show the problematic case
  2. Anything is working as expected with the realtime mode (php bin/magento indexer:set-mode realtime). So a temporary solution is to switch to realtime mode which is not a good option for shops with large SKU quantities and frequent product changes
@magento-engcom-team
Copy link
Contributor

Hi @NicoSiebler. 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.

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

  • yes
  • no

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Oct 2, 2018
@NicoSiebler
Copy link
Author

@magento-engcom-team give me 2.2.6 instance

@magento-engcom-team
Copy link
Contributor

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

@NicoSiebler
Copy link
Author

@magento-engcom-team yes
On a local vanilla setup 2.2.5 with sample data.

@magento-engcom-team
Copy link
Contributor

Hi @NicoSiebler, here is your Magento instance.
Admin access: https://i-18335-2-2-6.engcom.dev.magento.com/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.

@NicoSiebler
Copy link
Author

Example setup:

Category: https://i-18335-2-2-6.engcom.dev.magento.com/test.html
Product: https://i-18335-2-2-6.engcom.dev.magento.com/test-product.html

The product was initially out of stock, so not visible. I set it to in stock with a positive quantity. Seems the cron does not run or does not run every few minutes.
@magento-engcom-team If you run the cron/indexing cron, the problem should be visible. The product will be available, but the category page would not be invalidated.

@ghost ghost self-assigned this Nov 28, 2018
@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
Copy link

ghost commented Nov 28, 2018

Hi @NicoSiebler thank you for you report i'm closing this as duplicate to this -> #19417

@ghost ghost closed this as completed Nov 28, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed
Projects
None yet
Development

No branches or pull requests

2 participants