Skip to content

"Value must be unique" error when maxDocs is reached #11550

Open
@notflip

Description

@notflip

Describe the Bug

I'm not sure what the default behaviour is when the versions of a collection reach the maxDocs (20 in my case), but I'm getting the following errors:

"data": {
        "id": 29,
        "errors": [
          {
            "message": "Value must be unique",
            "path": "id"
          }
        ]
      },
      "isOperational": true,
      "isPublic": false,
      "status": 400,
      "name": "ValidationError"
    }

Link to the code that reproduces this issue

working on it

Reproduction Steps

working on it

Which area(s) are affected? (Select all that apply)

Not sure

Environment Info

Binaries:
  Node: 20.10.0
  npm: 10.2.3
  Yarn: 1.22.22
  pnpm: 9.13.2
Relevant Packages:
  payload: 3.25.0
  next: 15.2.0
  @payloadcms/db-postgres: 3.25.0
  @payloadcms/email-nodemailer: 3.25.0
  @payloadcms/graphql: 3.25.0
  @payloadcms/live-preview: 3.25.0
  @payloadcms/live-preview-react: 3.25.0
  @payloadcms/next/utilities: 3.25.0
  @payloadcms/plugin-cloud-storage: 3.25.0
  @payloadcms/plugin-nested-docs: 3.25.0
  @payloadcms/plugin-seo: 3.25.0
  @payloadcms/richtext-lexical: 3.25.0
  @payloadcms/storage-s3: 3.25.0
  @payloadcms/translations: 3.25.0
  @payloadcms/ui/shared: 3.25.0
  react: 19.0.0
  react-dom: 19.0.0
Operating System:
  Platform: darwin
  Arch: x64
  Version: Darwin Kernel Version 24.3.0: Thu Jan  2 20:22:00 PST 2025; root:xnu-11215.81.4~3/RELEASE_X86_64
  Available memory (MB): 16384
  Available CPU cores: 8

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