Inline blocks are not saved after being cloned

Created on 13 March 2024, 7 months ago

Problem/Motivation

When saving a section or template to the library, inline blocks are cloned during the process, but that duplicate is not saved to the database.

Steps to reproduce

Add a section to your page, add a custom block to it (our block is only a title and a wysiwyg, no entity reference).
Save that page, then go back in it, and add the section to your section library.
It will save properly, and you can add the template back in your page.
But if you look at the actual data in the database, you'll noticed that no new block were created.
You can see the issue by looking at the serialized version of the data. The block will have a different UUID.

This breaks when trying to use Section Library with Entity Share, as Entity Share will try to find a block that doesn't exists.

Proposed resolution

When digging in this, I saw that the clone seemed to improperly update the entity values. Also, the UUID key of the SectionComponent config isn,t set properly.

Remaining tasks

- Understand why the clone carries a different UUID in values and fields
- Figure out why the duplicated block isn't saved to the database.

🐛 Bug report
Status

Active

Version

1.1

Component

Code

Created by

🇨🇦Canada arakwar

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

Comments & Activities

Production build 0.71.5 2024