When cloning a custom block with a paragraph inside the layout builder, an error occurs indicating that the paragraph cannot be duplicated with the same id and uuid. This occurs because when the block is cloned, the paragraph is copied with the same id and uuid.

Steps to reproduce
  1. Create a custom block and add a paragraph to it.
  2. Add the block to the layout builder.
  3. Clone the block and observe the problem.

Proposed solution

Create a new ID and UUID for the paragraph

Comments

Mutasim Al-Shoura created an issue. See original summary.

mutasim al-shoura’s picture

Issue summary: View changes
mutasim al-shoura’s picture

StatusFileSize
new4.26 KB
mutasim al-shoura’s picture

StatusFileSize
new4.33 KB
mutasim al-shoura’s picture

Issue summary: View changes
proweb.ua’s picture

#4 works

afi13’s picture

Thank you!

The proposed solution handles only a single valued paragraph field, we have several paragraphs in one field and it clones only the first one.
I added adjustments to the patch to make it work for multiple values too.

mutasim al-shoura’s picture

I enhanced the handling of multi-paragraph.

afi13’s picture

Status: Active » Needs review