Skip to content

Delete tenant hangs when using global collections #16045

@simovicaleksa

Description

@simovicaleksa

Describe the Bug

When using multi-tenant plugin with some collections marked as global you are unable to delete the tenant. Attempting to do so leaves the delete request hanging without any errors in frontend or console.

Image

Removing collections marked as global from the configuration fixes the issue, as well as setting cleanupAfterTenantDelete: false.

Link to the code that reproduces this issue

https://github.com/simovicaleksa/delete-tenant-reproduction

Reproduction Steps

  1. Clone the reproduction repo
  2. docker compose up -d
  3. pnpm build
  4. pnpm start
  5. Create user with super-admin role
  6. Create tenant A
  7. Publish settings global collection for tenant A (optional)
  8. Try to delete tenant A

Which area(s) are affected?

plugin: multi-tenant

Environment Info

Binaries:
  Node: 24.10.0
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  payload: 3.79.1
  next: 15.4.11
  @payloadcms/db-postgres: 3.79.1
  @payloadcms/drizzle: 3.79.1
  @payloadcms/graphql: 3.79.1
  @payloadcms/next/utilities: 3.79.1
  @payloadcms/plugin-multi-tenant: 3.79.1
  @payloadcms/richtext-lexical: 3.79.1
  @payloadcms/translations: 3.79.1
  @payloadcms/ui/shared: 3.79.1
  react: 19.2.1
  react-dom: 19.2.1
Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Pro
  Available memory (MB): 32689
  Available CPU cores: 16

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions