Skip to content

Copying blocks does not generate new UUIDs, causing cross-document block ID duplication #15227

@bwcroft

Description

@bwcroft

Describe the Bug

When copying content from a block field and pasting it into a new entry, the system does not generate new UUIDs for the pasted block entries. Instead, the blocks retain their original UUIDs from the source document.

Because block UUIDs are duplicated across documents, the affected entries cannot be published. This makes copying block-based content between entries unreliable and blocks common content reuse workflows.

Link to the code that reproduces this issue

https://bitbucket.org/clearlinkit/payloadcms-issues/src/master/src/issues/block-duplicate-uuid/BlockDuplicateUUID.ts

Reproduction Steps

block-douplicate-uuid-demo.mov

Which area(s) are affected?

area: ui

Environment Info

Binaries:
  Node: 20.11.0
  npm: 10.2.4
  Yarn: 1.22.22
  pnpm: 10.6.4
Relevant Packages:
  payload: 3.70.0
  next: 15.4.10
  @payloadcms/db-postgres: 3.70.0
  @payloadcms/drizzle: 3.70.0
  @payloadcms/graphql: 3.70.0
  @payloadcms/next/utilities: 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: darwin
  Arch: arm64

Metadata

Metadata

Assignees

Labels

area: uiRelated to the admin panel.db: postgres@payloadcms/db-postgres

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions