Skip to content

[Forwardport] [TASK] Solve issue #14966 - Disabling product does not remove it from #16791

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

Merged

Conversation

gelanivishal
Copy link
Contributor

@gelanivishal gelanivishal commented Jul 13, 2018

… the flat index

Description

When you disable a product it should be removed from the flat table

Fixed Issues (if relevant)

  1. Disabling product does not remove it from the flat index #14966: Disabling product does not remove it from the flat index

Manual testing scenarios

  1. Install Magento 2.2.3 together with the sample data set.
  2. Make sure cron is run every minute (bin/magento cron:run).
  3. Make sure the config setting Use Flat Catalog Product is set to Yes.
  4. Make sure the flat index is up-to-date: bin/magento index:reindex catalog_product_flat.
  5. Choose an enabled product in the Magento admin backend. Say its ID is X.
  6. Make sure that there exists an entry in table catalog_product_flat_1 with entity_id = X. If not, you've done something wrong.
  7. Now, in the Magento admin backend, disable the product.
  8. Wait a few minutes.
  9. Check whether the table catalog_product_flat_1 still contains an entry with entity_id = X.

Expected result

  1. The table catalog_product_flat_1 should contain no entry with entity_id = X.

Actual result

  1. The table catalog_product_flat_1 contains an entry with entity_id = X.

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

Original PR

#15019

@magento-engcom-team
Copy link
Contributor

Hi @gelanivishal. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me {$VERSION} instance - deploy vanilla Magento instance

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

@sidolov
Copy link
Contributor

sidolov commented Jul 23, 2018

Hi @gelanivishal , we found that with provided implementation one integration test is failing. Please, take a look at Magento\Catalog\Model\Indexer\Product\Flat\Action\RowTest::testProductUpdate

@gelanivishal
Copy link
Contributor Author

@sidolov Please check now.

@sidolov
Copy link
Contributor

sidolov commented Jul 24, 2018

Hi @gelanivishal , there are no fixes to Magento\Catalog\Model\Indexer\Product\Flat\Action\RowTest::testProductUpdate was provided in your latest commit. I see only code style fixes in unit test /Magento/Catalog/Test/Unit/Model/Indexer/Product/Flat/Action/RowTest.php and this changes does not affect the functional issue that was introduced in the previous commits.

@gelanivishal
Copy link
Contributor Author

@sidolov Now travis didn't throw any error.

@magento-engcom-team
Copy link
Contributor

Hi @gelanivishal. Thank you for your contribution.
We will aim to release these changes as part of 2.3.0.
Please check the release notes for final confirmation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants