Skip to content

Bulk Delete Leaves One Item #15100

Closed
Closed

Description

@martinwoo7

Describe the Bug

In Payload 3.70.0 (and below), using bulk delete on records in a collection always leaves the last record (or one of the records) undeleted. This is reflected in the database as well.

Link to the code that reproduces this issue

https://github.com/martinwoo7/test-delete

Reproduction Steps

I've included a link to a repo but all I did was create a new Payload app using the website template - I haven't changed any code at all.

Image Image Image Image

In the admin panel, delete all the records in Categories collection and all but one will be deleted. Refreshing the page doesn't remove it and checking the database also shows the item still exists.

This happens with Vercel Postgres, using both Neon database and Supabase

Which area(s) are affected?

db: vercel-postgres

Environment Info

Binaries:
  Node: 22.15.1
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  payload: 3.70.0
  next: 15.4.10
  @payloadcms/db-vercel-postgres: 3.70.0
  @payloadcms/drizzle: 3.70.0
  @payloadcms/graphql: 3.70.0
  @payloadcms/live-preview: 3.70.0
  @payloadcms/live-preview-react: 3.70.0
  @payloadcms/next/utilities: 3.70.0
  @payloadcms/plugin-form-builder: 3.70.0
  @payloadcms/plugin-nested-docs: 3.70.0
  @payloadcms/plugin-redirects: 3.70.0
  @payloadcms/plugin-search: 3.70.0
  @payloadcms/plugin-seo: 3.70.0
  @payloadcms/richtext-lexical: 3.70.0
  @payloadcms/translations: 3.70.0
  @payloadcms/ui/shared: 3.70.0
  react: 19.2.1
  react-dom: 19.2.1
Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Pro
  Available memory (MB): 16311
  Available CPU cores: 16

Activity

  1. added
    status: needs-triage
    validate-reproduction
    on Jan 6, 2026
  2. added
    db: vercel-postgres
    and removed
    validate-reproduction
    on Jan 6, 2026
  3. removed
    db: vercel-postgres
    on Jan 6, 2026
  4. self-assigned this
    on Jan 6, 2026
  5. removed
    status: needs-triage
    on Jan 6, 2026
  6. added
    status: cant-reproduce
    area: ui
    on Jan 6, 2026
  7. PatrikKozak commented on Jan 6, 2026

    @PatrikKozak
    Contributor

    Hey @martinwoo7 - I tried to reproduce this on my end and I'm currently not able to - I'm seeing all my documents properly deleted.

    Are you able to reproduce this behavior locally and in production?

    If you open your network panel / console and try to reproduce the behavior again, do you see any failed requests or errors in your console?

  8. PatrikKozak commented on Jan 16, 2026

    @PatrikKozak
    Contributor

    @martinwoo7 I also went ahead and pulled down your reproduction repo that you included above and was still unable to reproduce the behavior.

    After seeding the DB and deleting all category documents, all of the docs were properly deleted.

    If this issue still persists on your end, please try updating to the latest Payload version 3.71.1 and see if you're getting any errors in your logs / network panel.

    Going to close this for now but happy to re-open this if you are stilling having trouble and can provide more information, thanks!

  9. removed
    status: cant-reproduce
    on Jan 16, 2026
  10. github-actions commented on Jan 24, 2026

    @github-actions
    Contributor

    This issue has been automatically locked.
    Please open a new issue if this issue persists with any additional detail.

  11. locked as resolved and limited conversation to collaborators on Jan 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: ui

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions