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

ElasticSearch update fails after deleting product attribute #252

Open
SoleneGK opened this issue Aug 27, 2024 · 2 comments
Open

ElasticSearch update fails after deleting product attribute #252

SoleneGK opened this issue Aug 27, 2024 · 2 comments

Comments

@SoleneGK
Copy link

Expected behavior

Product is deleted in database
Elasticsearch index is updated
Product list is displayed

Current behavior

Product is deleted in database
Elasticsearch index is not updated
A 500 error occurs

Screenshot from 2024-08-27 10-22-30

Steps to reproduce

  1. Create a product
  2. Delete the product

Detailed description

The error happens because BitBag\SyliusElasticsearchPlugin\EventListener\ResourceIndexListener is called on the event sylius.product.post_delete. Since the product removal has been processed by Doctrine, the product object id has been set to null.

Listener config file : src/Resources/config/services/event_listener.xml

This problem also happen when deleting a product attribute, an option or a product variant.

@leszczuu
Copy link
Contributor

#256

@jon92
Copy link

jon92 commented Oct 28, 2024

Thank you for the fix, it works for deleting products, but not for deleting product variants. Indeed, I still get this error when I try to delete a variant:
Capture d’écran du 2024-10-28 11-07-23

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

No branches or pull requests

3 participants