Skip to content

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

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

lewisvoncken
Copy link
Contributor

@lewisvoncken lewisvoncken commented Jan 31, 2018

…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)

…et to 0 for new products when using index on save
@rogyar rogyar self-assigned this Jan 31, 2018
@rogyar rogyar self-requested a review February 3, 2018 20:46
@rogyar
Copy link
Contributor

rogyar commented Feb 3, 2018

Hello @lewisvoncken. Thank you for your contribution. Please, fix the failed integration test. Thanks

@rogyar
Copy link
Contributor

rogyar commented Mar 5, 2018

Hello @lewisvoncken. Are you going to proceed with this PR?

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.

2 participants