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

Prevent undefined offset error on deleted categories. #485

Merged
merged 1 commit into from
Aug 9, 2017

Conversation

romainruaud
Copy link
Collaborator

This one is a workaround for this issue : magento/magento2#10421

This could lead to several errors, since we rely on this table when reindexing products, and provoke failures when trying to index category names into products.

To reproduce :

  • Have the indexers in "Update on Save" mode.
  • Delete the category YYY where the product XXX is affected.
  • Try to execute an action which triggers a reindex of this product (save it in the BO, or event order it in front-office)
  • The action will fail, due to "Undefined index: YYY on module-elasticsuite-catalog/Model/ResourceModel/Product/Indexer/Fulltext/Datasource/CategoryData
    .php on line 93"

This is due to the fact we rely on a table where old rows concerning a deleted category are still present.

Regards,

@afoucret afoucret merged commit 259c1bd into Smile-SA:2.3.x Aug 9, 2017
@romainruaud romainruaud deleted the fix_category-deletion-index branch March 15, 2018 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants