craft-elasticsearch icon indicating copy to clipboard operation
craft-elasticsearch copied to clipboard

Element delete doesn't delete entries in Queue

Open sfsmfc opened this issue 1 year ago • 1 comments

If you delete an entry faster as the queue can execute an index job, you run into an error "Element #9055834 (site #1) not found (type: craft\elements\Entry)", because the element doesn't exists anymore. The delete action should also delete index entries in the queue to prevent such an error.

Tasks to reproduce this error:

  • set "runQueueAutomatically" to false in config/general.php
  • create a new entry
  • a new index entry will be pushed into queue
  • delete this new entry
  • execute the queue

I will look, if I could make a patch for this.

sfsmfc avatar Aug 10 '23 08:08 sfsmfc

Pull-Request https://github.com/la-haute-societe/craft-elasticsearch/pull/37 is ready for review.

sfsmfc avatar Aug 16 '23 09:08 sfsmfc