Problem/Motivation

I suggest supporting adding inline blocks in the predefined layouts, so when creating a new node using this layout it will automatically create a clone for the existing inline blocks in the layout.

Steps to reproduce

1- Create a custom block called accordion.
2- Create a custom block called accordion section.
3- Add entity reference field to the accordion block to reference the accordion section block.
4- Create a new layout from layout library.
5- Add an accordion block to a section.
6- Create a node with the created layout.
7- It will create the accordion block but it will keep using the original accordion sections (inline-block) that are used in the layout.

Proposed resolution

I suggest updating the event subscriber to clone the section deeply with any inline blocks used in it.

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#9 3273160-9.patch10.86 KBqusai taha
#7 3273160-7.patch1.46 KBqusai taha
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Odai Atieh created an issue. See original summary.

odai atieh’s picture

Status: Active » Needs review

Tested only for inline blocks, and need testing for paragraphs.

rajab natshah’s picture

Status: Needs review » Reviewed & tested by the community
larowlan’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs tests

We'd want some tests here, thanks

pyrello made their first commit to this issue’s fork.

qusai taha’s picture

Status: Needs work » Needs review
StatusFileSize
new1.46 KB

Fix clone issue Custom block content with entity reference revision

Status: Needs review » Needs work

The last submitted patch, 7: 3273160-7.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

qusai taha’s picture

StatusFileSize
new10.86 KB
rajab natshah’s picture

Status: Needs work » Reviewed & tested by the community