Skip to content

Navigation child block cannot be inserted anymore. #73826

@Hug0-Drelon

Description

@Hug0-Drelon

Description

What?

Custom block with core/navigation as parent cannot be inserted with WordPress 6.9 (works with 6.8).

Expected behavior:

I expect the block to be inserted (like in WordPress 6.8). See an example bellow with 6.8:

Step-by-step reproduction instructions

  • Create a custom block (I used @wordpress/create-block default block).
  • In block.json, add "parent": [ "core/navigation" ].
  • Activate a block theme (TwentyTwentyFive in my case).
  • Visit "Appearance" => "Editor" => "Navigation".
  • Edit the Navigation.
  • Add the custom block.
  • See "Block "Foo" can't be inserted" notice and no block added (see a screenshot bellow).

Screenshots, screen recording, code snippet

With WordPress 6.9:

Image

With WordPRess 6.8:

Image

Environment info

  • WordPress 6.9
  • PHP 8.4
  • TwentyTwentyFive 1.4
Custom block config Here is the `block.json` config. I used the default rendering JS files from `npx @wordpress/create-block@latest`.
{
	"$schema": "https://schemas.wp.org/trunk/block.json",
	"apiVersion": 3,
	"name": "create-block/foo",
	"version": "0.1.0",
	"title": "Foo",
	"category": "design",
	"icon": "smiley",
	"description": "Example block scaffolded with Create Block tool.",
	"example": {},
	"parent": [ "core/navigation" ],
	"supports": {
		"html": false
	},
	"textdomain": "foo",
	"editorScript": "file:./index.js",
	"editorStyle": "file:./index.css",
	"style": "file:./style-index.css",
	"viewScript": "file:./view.js"
}

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

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Labels

[Block] NavigationAffects the Navigation Block[Status] In ProgressTracking issues with work in progress[Status] In discussionUsed to indicate that an issue is in the process of being discussed[Type] BugAn existing feature does not function as intended

Type

No fields configured for Bug.

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions