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

Products does not appear in Products List Preview and Sorting section #2771

Closed
VasyaTopalo opened this issue Nov 7, 2022 · 9 comments
Closed
Labels

Comments

@VasyaTopalo
Copy link

VasyaTopalo commented Nov 7, 2022

Some products are not shown in Products List Preview and Sorting section and on frontend even though these products present in the category product listing, also these products are enabled, and visibility is set to Catalog, Search. The visibility attribute is global.
Screenshot from 2022-11-07 11-18-43

This issue happens only when I disable Use default positions for store views and try to set my positions. On a global level, everything seems to be fine.
Also after if turn off manual sorting for a product, after saving and reindex this product just disappear but it should be automatically sorted and present in Products List Preview and Sorting section.
Screenshot from 2022-11-07 11-19-16

Maybe I don't understand how products are loaded in Products List Preview and Sorting section, can you please help?

My magento version: 2.4.2
Elasticsuite vesrsion: 2.10.9.1

@VasyaTopalo
Copy link
Author

VasyaTopalo commented Nov 7, 2022

From what I tried to debug I found out that products are loaded by AJAX and found that the id of the product that I need, disappears on vendor/smile/elasticsuite/src/module-elasticsuite-virtual-category/Model/Preview.php in function prepareProductCollection(Collection $collection) after $collection->addQueryFilter($queryFilter) is added to the collection, I've tried to debug $queryFilter but can't really understand how this work.
$queryFilter in xdebug looks like this
Screenshot from 2022-11-07 12-18-47

@VasyaTopalo
Copy link
Author

I have an update about this if for a product on a global level sorting is set to manual and on store view is set to automatic then after reindex, the product disappears from store view.

@vahonc
Copy link
Collaborator

vahonc commented Nov 7, 2022

Hello @VasyaTopalo

Are you using a multi-websites environment? If it's so, you need to check your Indices configuration, probably you have some conflicts during reindexation process.

BR,
Vadym

@VasyaTopalo
Copy link
Author

Hi @vahonc
Thanks for your reply)
Yes, I use multi-websites environment, I have checked logs while reindexing, and there are no issues.
My configuration looks like this
Screenshot (2)
Screenshot (3)

@vahonc
Copy link
Collaborator

vahonc commented Nov 8, 2022

@VasyaTopalo

On one of your screenshots, I see that the Elasticsearch Servers List parameter is empty. Are you clear it's for security reasons or it showed as is?

Also, provide an output of this command:

$ curl http://localhost:9200/_cat/indices?v

BR,
Vadym

@VasyaTopalo
Copy link
Author

VasyaTopalo commented Nov 8, 2022

@vahonc
Elasticsearch Servers List looks like this: localhost:9200
Result of curl http://localhost:9200/_cat/indices?v

health status index
green open magento2_fr_thesaurus_20221108_104009 PFhVe52UT9SiQE_cr4-ICA 1 0 0 0 226b 226b
green open magento2_ch_fr_thesaurus_20221108_104009 _wobpCoRTPCn19AMaxFBnQ 1 0 0 0 226b 226b
green open magento2_us_catalog_category_20221108_104008 ZBrZ9yZ8QlSLtQcjEU-MMg 1 0 43 0 44.8kb 44.8kb
green open .geoip_databases kACAAmDKSJONt2PZMwGQrQ 1 0 41 0 39mb 39mb
green open magento2_ch_de_thesaurus_20221108_104008 K0pMzNlWQM2XRqv7Nxyazg 1 0 0 0 226b 226b
green open magento2_ch_fr_catalog_product_20221108_103952 0lwNOX8UTlukQs5OdmYSyA 1 0 6980 0 5.8mb 5.8mb
green open magento2_be_catalog_category_20221108_104008 40hUzPz5QnKhbQ7xhT3xiw 1 0 43 0 56.9kb 56.9kb
green open magento2_intl_thesaurus_20221108_104009 kwUbzCNJR6W1AoFl3Ln95Q 1 0 0 0 226b 226b
green open magento2_ch_fr_catalog_category_20221108_104006 6nFU3fTrRw28s3VX-M6ZCQ 1 0 46 0 60kb 60kb
green open magento2_de_catalog_product_20221108_103957 fvNS1DdJTfSvX_Jd0CfPVA 1 0 5569 0 4.3mb 4.3mb
green open magento2_intl_catalog_product_20221108_103956 wTwo_f46RDGsH6YvO7F0KQ 1 0 5569 0 4.3mb 4.3mb
green open magento2_be_thesaurus_20221108_104009 _90K6L4nSeuCr2HogZzZUQ 1 0 0 0 226b 226b
green open magento2_fr_catalog_category_20221108_104007 O0pSCuJaR-O8zVVN-cUiQg 1 0 43 0 56.9kb 56.9kb
green open magento2_de_catalog_category_20221108_104007 -VYuwV0oRdixhg1EUpLyUA 1 0 43 0 48.7kb 48.7kb
green open magento2_us_thesaurus_20221108_104010 pnoD6LIrQjOuQi5v2Kqw1A 1 0 0 0 226b 226b
green open magento2_de_thesaurus_20221108_104009 ri9yxcCzRSGhsnjMJ342Vg 1 0 0 0 226b 226b
green open magento2_ch_en_catalog_product_20221108_103950 thxRcudbT9SaY1nf99sqHg 1 0 6980 0 4.9mb 4.9mb
green open magento2_ch_de_catalog_category_20221108_104005 SVc37UJhR1uM-JK5y7lFrw 1 0 46 0 51.2kb 51.2kb
green open magento2_intl_catalog_category_20221108_104006 s9h7WtzzS5a9kxXO_5c0vw 1 0 43 0 46.1kb 46.1kb
green open magento2_ch_en_catalog_category_20221108_104006 3AJGbI-jQACqXqXsr-kVpA 1 0 46 0 48.7kb 48.7kb
green open magento2_ch_de_catalog_product_20221108_103948 FDAp_PVvRum21LsyqVtZ3w 1 0 6976 0 4.9mb 4.9mb
green open magento2_be_catalog_product_20221108_104002 l_wS6ijUSnyMRBcTzq07jQ 1 0 5590 0 5.1mb 5.1mb
green open magento2_fr_catalog_product_20221108_103959 gZp4OjAPToWjtzBv1f4RoQ 1 0 5531 0 5.1mb 5.1mb
green open magento2_us_catalog_product_20221108_104005 _1hjbx9STZ6O9K-1nVhENw 1 0 105 0 164.9kb 164.9kb
green open magento2_ch_en_thesaurus_20221108_104009 ylJOWP4dRdaZKmyXMPu0aQ 1 0 0 0 226b 226b

@vahonc
Copy link
Collaborator

vahonc commented Nov 11, 2022

@VasyaTopalo,

Finally, I was able to reproduce your issue on my test environment with multi-websites. I will try to dig into the code to understand what is wrong with this.

BR,
Vadym

@VasyaTopalo
Copy link
Author

Thank's for your reply, I have reproduced this issue on my other projects where smile is installed. Hope you fix this))

@romainruaud
Copy link
Collaborator

@VasyaTopalo can you confirm that a way of reproducing this is :

  • a product has a given position on "global" (All Store Views) level
  • it has no position on a particular store view level (or you remove the position)

Regards

romainruaud added a commit that referenced this issue Dec 2, 2022
…xing

Fix #2771 where products having a position at global level but no pos…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants