You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reusable Blocks: Convert to Regular Block does not preserve nested blocks #9278
If you save a block containing nested blocks as a Reusable Block, then it works just fine as a Reusable Block. But if you try to convert an instance of that Reusable Block to a regular block, then the resulting regular block will not contain any of the nested blocks that the Reusable Block had.
Steps to reproduce
Insert a Columns block.
Insert some other block into the Columns block.
Open the ellipsis (More Options) menu and choose Add to Reusable Blocks.
Finish naming and saving the Reusable Block.
Notice that the nested blocks are saved in the Reusable Block as expected.
Open the ellipsis menu again and choose Convert to Regular Block.
Notice that the nested blocks are gone.
Expected behavior
Reusable blocks should preserve nested blocks when an instance is converted to a regular block.
Tested and confirmed using WordPress 4.9.8 and Gutenberg 3.6.2 and noting that in my case the blocks were preserved but the content inside them was not. (39s)
Is anyone working on a fix for this? The issue also occurs when using the Atomic Blocks plugin's AB Container block. I would like to create reusable sections (ex: image with heading, paragraph, and button) that clients could drop onto a page and then edit the content, similar to how the Divi library works. The only workaround for now is to copy the HTML for the nested blocks, paste into an HTML block and then Convert to Blocks - obviously not ideal for users who are afraid of code.
Activity
designsimply commentedon Aug 23, 2018
Tested and confirmed using WordPress 4.9.8 and Gutenberg 3.6.2 and noting that in my case the blocks were preserved but the content inside them was not. (39s)
noisysocks commentedon Aug 24, 2018
Likely the same root cause as #5754.
asadrahbar commentedon Sep 18, 2018
Is anyone working on a fix for this? The issue also occurs when using the Atomic Blocks plugin's AB Container block. I would like to create reusable sections (ex: image with heading, paragraph, and button) that clients could drop onto a page and then edit the content, similar to how the Divi library works. The only workaround for now is to copy the HTML for the nested blocks, paste into an HTML block and then Convert to Blocks - obviously not ideal for users who are afraid of code.
riemerta6 commentedon Oct 19, 2018
I'm also experiencing the same issue :/ Learned the hard way.
noisysocks commentedon Oct 29, 2018
After looking into this some more, I think that this is a seperate bug caused by not passing
referencedBlock.innerBlockshere:gutenberg/packages/editor/src/store/effects/reusable-blocks.js
Line 240 in 308f6aa