You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you delete an item from a search-enabled collection, the stale search results are not deleted. This request in the afterDelete hook returns 0 results when there should be 1.
I was able to fix to fix the issue by copying the existing afterDelete hook into my collections and removing the req option from the aforementioned query [ref]. It looks like that line was introduced recently in #5068 to support transactions.
Link to reproduction
https://github.com/wkentdag/payload-search-delete-bug
Describe the Bug
When you delete an item from a search-enabled collection, the stale search results are not deleted. This request in the
afterDelete
hook returns 0 results when there should be 1.I was able to fix to fix the issue by copying the existing
afterDelete
hook into my collections and removing thereq
option from the aforementioned query [ref]. It looks like that line was introduced recently in #5068 to support transactions.search-delete-bug-compressed.mov
To Reproduce
Payload Version
2.12.1
Adapters and Plugins
bundler-webpack, db-postgres, plugin-search
The text was updated successfully, but these errors were encountered: