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

Problem of reindex for a categories that created via API #441

Closed
nuzil opened this issue Jun 2, 2017 · 4 comments
Closed

Problem of reindex for a categories that created via API #441

nuzil opened this issue Jun 2, 2017 · 4 comments

Comments

@nuzil
Copy link

nuzil commented Jun 2, 2017

Hello

We faced with a next problem.
For not default Website we created new Category by using Magento REST api. Category was successfully created, but when we are trying ti make a reindex or save any product in backend, we getting next error:

Notice: Undefined offset: 79 in /home/dev/public_html/vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Model/ResourceModel/Product/Indexer/Fulltext/Datasource/CategoryData.php on line 93

Just had a look at the code a little, and see that select query tries to get default names of the category:

->where('default_value.store_id = ?', 0)
But for those categories default name is not existed in database.

Can you please check and fix that if possible

Preconditions

Magento Version : 2.1.6
Elasticsuite version: 2.3.2.1
Environment : default mode

Steps to reproduce

  1. Create new category via API for NOT default Website
  2. Try to save any product

Expected result

  1. Success message

Actual result

  1. Notice: Undefined offset: 79 in /home/dev/public_html/vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Model/ResourceModel/Product/Indexer/Fulltext/Datasource/CategoryData.php on line 93
@romainruaud
Copy link
Collaborator

Hello @nuzil ,

could you please provide an example of how you are creating the category ? Then I'll be able to reproduce your issue exactly.

Regards

@romainruaud
Copy link
Collaborator

Hello @nuzil

Could you check the fix provided in PR #448 solves your issue ?

Best regards,

@paulbarker
Copy link

paulbarker commented Jun 16, 2017

Not sure if this is related but I have API generated categories and I'm getting this when I try to reindex via the CLI:

# bin/magento index:reindex catalogsearch_fulltext
Catalog Search indexer process unknown error:
Warning: Invalid argument supplied for foreach() in /home/magento2/magento2/vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Model/Product/Indexer/Fulltext/Datasource/CategoryData.php on line 93

@afoucret
Copy link
Contributor

PR Merged

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

No branches or pull requests

4 participants