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
Assignees
Labels
[Block] Navigation Affects the Navigation Block [Status] In Progress Tracking issues with work in progress [Type] Regression Related to a regression in the latest release

Comments

@talldan
Copy link
Contributor

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

@talldan talldan added [Type] Regression Related to a regression in the latest release [Block] Navigation Affects the Navigation Block labels Dec 14, 2021
@talldan talldan added this to 📥 To do in WordPress 5.9 Must-Haves via automation Dec 14, 2021
@talldan talldan self-assigned this Dec 14, 2021
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Dec 14, 2021
@noisysocks noisysocks moved this from 📥 To do to 🏗️ In progress in WordPress 5.9 Must-Haves Dec 14, 2021
WordPress 5.9 Must-Haves automation moved this from 🏗️ In progress to ✅ Done Dec 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block [Status] In Progress Tracking issues with work in progress [Type] Regression Related to a regression in the latest release
Projects
No open projects
1 participant