Duplicating an entity with inline blocks does not duplicate the blocks

Created on 27 May 2025, 28 days ago

Problem/Motivation

I was very interested to see how 📌 Create recipe to clone entities with ECA Active worked with layout builder, most importantly how it tackled duplication issues with paragraphs and/or layout builder.

When testing with layout builder after adding an inline block, I confirmed by suspicions that the inline blocks are not duplicated. This was partially pointed to in comment 16 of that issue and in https://www.drupal.org/project/drupal_cms/issues/3474608#comment-15860994 📌 Evaluate cloning modules Active

The reason this is an issue is that after duplicating a node, both nodes reference the same inline block entity. Editing it in one node will break the other. I assume this issue will also be present for paragraphs but haven't tested that yet.

Steps to reproduce

Install drupal_cms
Run ddev exec drush recipe /var/www/html/web/core/recipes/basic_block_type/
Add an inline block to a node
Duplicate the node
Notice both nodes are referencing the same block and there is only 1 block in the DB.

Proposed resolution

Not sure if this is possible to fix with ECA

🐛 Bug report
Status

Active

Component

Base Recipe

Created by

🇦🇺Australia acbramley

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024