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

Navigation block no longer supports inner blocks in its markup #37354

Closed
talldan opened this issue Dec 14, 2021 · 0 comments · Fixed by #37358
Closed

Navigation block no longer supports inner blocks in its markup #37354

talldan opened this issue Dec 14, 2021 · 0 comments · Fixed by #37358

Comments

@talldan
Copy link
Contributor

@talldan talldan commented Dec 14, 2021

Description

It should be possible to insert a nav block with the following markup:

<!-- wp:navigation -->
<!-- wp:navigation-link {"label":"Hello world!","type":"post","id":1,"url":"http://localhost:8888/?p=1","kind":"post-type","isTopLevelLink":true} /-->
<!-- wp:navigation-link {"label":"Sample Page","type":"page","id":2,"url":"http://localhost:8888/?page_id=2","kind":"post-type","isTopLevelLink":true} /-->
<!-- /wp:navigation -->

This is important for backwards compatibility. Instances of the block that were inserted before the existence of the wp_navigation post should be retained, but also for patterns that define the block in this way.

Unfortunately this seems to have regressed (I think in #36880 and possibly partly in #36760), which seems like it could have resulted in users losing content.

Step-by-step reproduction instructions

  1. Create a new post in the post editor
  2. Switch to code editor mode and paste in the above block
  3. Switch to visual editing mode.

Expected - the block should show the inner blocks
Actual - the inner blocks are deleted and the block placeholder is shown

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Linked pull requests

Successfully merging a pull request may close this issue.

1 participant