Skip to content

[Backport] [BUGFIX] Added row_id to the flat action indexer so the value isn't s… #17116

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

Conversation

chirag-wagento
Copy link
Contributor

Original Pull Request

#15010
reopen #13446

…et to 0 for new products when using index on save

Description

If you use the \Magento\Framework\Api\SearchCriteriaBuilder and the flat product row_id is set to 0. The product isn't shown in the getList of the ProductRepository

Manual testing scenarios

Issue was in the Commerce (EE) version but can be solved in the Open Source Codebase

  1. Enable Product Flat Catalog Stores > Settings > Configuration > Catalog > Catalog > Storefront > Use Flat Catalog Product
  2. Run the index manually through the command line php bin/magento indexer:reindex catalog_product_flat
  3. Set the Indexes to On Save System > Tools > Index Management > Select all and select the action Update on Save
  4. Create a New Product with SKU test
  5. Take a look in the database in the catalog_product_flat_1 tabel and search for the product with SKU test
  6. The row_id will be set to 0
  7. Apply Changes
  8. Save the Product
  9. Take a look at the database in the catalog_product_flat_1 tabel and search for the product with SKU test
  10. The row_id should now be equal to the entity_id

Besides looking in the database you could create a simpel collection by using the SearchCritieria and the ProductRepository

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)

@magento-engcom-team magento-engcom-team added Partner: Wagento Pull Request is created by partner Wagento partners-contribution Pull Request is created by Magento Partner Component: Catalog labels Jul 25, 2018
@osrecio osrecio self-assigned this Jul 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Catalog Partner: Wagento Pull Request is created by partner Wagento partners-contribution Pull Request is created by Magento Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants