Product documents are not appearing in Admin Trash view when trash: true is enabled
Describe the Bug
Product documents are not appearing in Admin Trash view when trash: true is enabled
Describe the Bug
When trash: true is enabled on the Products collection, deleting a Product from the Payload Admin Panel appears to complete successfully, but the deleted Product does not appear in the collection's Trash view.
The Admin Panel shows:
No Products in trash
Environment
- Payload CMS:
3.88.0 - Database: MongoDB
- Next.js:
16.3.3 - Collection:
products
Steps to Reproduce
- Enable
trash: trueon theProductscollection. - Create a Product.
- Open the Product in the Payload Admin Panel.
- Delete the Product.
- Open the Products collection's Trash view.
Expected Behavior
The deleted Product should be soft-deleted and appear in:
/collections/products/trashThe Product should have a deletedAt timestamp and should be available for:
- Restore
- Permanent Delete
Actual Behavior
The Product disappears from the normal Products list, but the Trash view shows:
No Products in trashAdditional Investigation
A trashed Product can be checked with:
const result = await payload.find({
collection: 'products',
trash: true,
where: {
deletedAt: {
exists: true,
},
},
})
console.log(result.docs)If the deleted Product appears in this query but not in the Admin Trash view, the issue appears to be related to the Admin Trash UI/query.
If the Product does not appear here either, the soft-delete operation may not be setting deletedAt correctly.
References
Payload Trash documentation:
https://payloadcms.com/docs/trash/overview
Link to the code that reproduces this issue
pnpx create-payload-app@latest -t ecommerch
Reproduction Steps
Acctuay Trash system is not working bro
Which area(s) are affected?
area: ui
Environment Info
DE_OPTIONS=--no-deprecation payload "info"
Binaries:
Node: 24.15.0
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant Packages:
payload: 3.88.0
next: 16.3.3
@payloadcms/db-mongodb: 3.88.0
@payloadcms/email-nodemailer: 3.88.0
@payloadcms/graphql: 3.88.0
@payloadcms/live-preview: 3.88.0
@payloadcms/live-preview-react: 3.88.0
@payloadcms/next/utilities: 3.88.0
@payloadcms/plugin-cloud-storage: 3.89.0
@payloadcms/plugin-form-builder: 3.88.0
@payloadcms/plugin-seo: 3.88.0
@payloadcms/richtext-lexical: 3.88.0
@payloadcms/translations: 3.88.0
@payloadcms/ui/shared: 3.88.0
react: 19.2.6
react-dom: 19.2.6
Operating System:
Platform: win32
Arch: x64
Version: Windows 11 Pro
Available memory (MB): 24237
Available CPU cores: 12
PS E:\01-utmeducation-com>Source: payloadcms/payload