Open
Description
Describe the bug
The deleteBlocks
helper function has a functionality where if the blocks_layout
key is empty after deletion, it will create a new block with the
volto/packages/volto/src/helpers/Blocks/Blocks.js
Lines 138 to 146 in 3330285
Possible solutions
- Leave it as is
- Can lead to odd behaviour where you have block definitions stored that aren't used in the layout
- Leave it as is and delete the existing block data
- Could lead to possible removal of wanted data
- Add all of the existing blocks back into the layout.
- It may end up with a messy layout, but at least it becomes clear what is stored and what isn't
- Check if any of the existing blocks are match the default block type and add that. Fallback to one of the above behaviours if not