Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inner blocks of a missing parent are lost on save #15202

Closed
brandonpayton opened this issue Apr 25, 2019 · 3 comments · Fixed by #14443
Closed

Inner blocks of a missing parent are lost on save #15202

brandonpayton opened this issue Apr 25, 2019 · 3 comments · Fixed by #14443
Labels
[Feature] Nested / Inner Blocks Anything related to the experience of nested/inner blocks inside a larger container, like Group or P [Feature] Parsing Related to efforts to improving the parsing of a string of data and converting it into a different f [Type] Bug An existing feature does not function as intended

Comments

@brandonpayton
Copy link
Member

Describe the bug
When a post contains a missing (i.e., unregistered) parent block containing inner blocks, its inner blocks are omitted from the content when the post is next saved.

To reproduce
Steps to reproduce the behavior:

  1. Open the block editor to create a new post.
  2. Add a columns block with a paragraph in each column.
  3. Safe the post as a draft.
  4. Open the same post in the Classic Editor and note the presence of the wp:columns block and its inner blocks.
  5. Rename the opening and closing <!-- wp:columns --> delimiters to use the name wp:columns-missing and save the draft.
  6. Reload the Classic Editor and note the presence of the wp:columns-missing block and its inner blocks.
  7. Open the post in the block editor and note the missing block notice.
  8. Add a paragraph block and save again.
  9. Open the post in Classic Editor and note the presence of wp:columns-missing block and the absence of inner blocks.

Expected behavior
The inner blocks of the wp:columns-missing block would be preserved in the post content.

@brandonpayton brandonpayton added [Type] Bug An existing feature does not function as intended [Feature] Parsing Related to efforts to improving the parsing of a string of data and converting it into a different f [Feature] Nested / Inner Blocks Anything related to the experience of nested/inner blocks inside a larger container, like Group or P labels Apr 25, 2019
@aduth
Copy link
Member

aduth commented Apr 26, 2019

Can you explain the difference between this and #13391 ? I see this has been linked to from #15078 which is directly related to the other issue.

@brandonpayton
Copy link
Member Author

At first, I thought it was the same issue. IIUC, the main thing about #13391 is that inner blocks cannot be nicely extracted from missing parent blocks.

@brandonpayton
Copy link
Member Author

I'm not sure that was clear enough. I believe the difference is that #13391 focuses on getting the blocks out of a missing parent so they can be used apart from the parent, while this issue focuses on content disappearing on save.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Nested / Inner Blocks Anything related to the experience of nested/inner blocks inside a larger container, like Group or P [Feature] Parsing Related to efforts to improving the parsing of a string of data and converting it into a different f [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants