Skip to content

Navigation block: Trying to add link results in block error when editing in Template Parts #29237

@annezazu

Description

@annezazu

Description

In trying to use the navigation block, I'm unable to add Page links and encounter an error message: "This block has encountered an error and cannot be previewed." This ONLY happens when in the Template Parts editing section. It works just fine in the Site Editor.

Step-by-step reproduction instructions

Please list the steps needed to reproduce the bug. For example:

  1. Go to Site Editor
  2. Use the W Menu to browse to the Header Template Part (Template Parts > Header)
  3. Add a navigation block
  4. Use the "start empty" option
  5. Try to add a link and see error.

Expected behaviour

I expected to be able to edit the navigation block within the template parts screen. This works just fine when in the site editor experience but breaks when viewing the template part specifically.

Actual behaviour

Run into a block error.

Screenshots or screen recording (optional)

Video:

navigation.block.mov

WordPress information

  • WordPress version: 5.6.2
  • Gutenberg version: 10.1
  • Are all plugins except Gutenberg deactivated? Yes
  • Are you using a default theme (e.g. Twenty Twenty-One)? Yes, TT1 Blocks

Metadata

Metadata

Assignees

Labels

[Block] NavigationAffects the Navigation Block[Block] Template PartAffects the Template Parts Block[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions