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: Trying to add link results in block error when editing in Template Parts #29237

Closed
annezazu opened this issue Feb 22, 2021 · 3 comments · Fixed by #29246
Closed
Assignees
Labels
[Block] Navigation Affects the Navigation Block [Block] Template Part Affects the Template Parts Block [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@annezazu
Copy link
Contributor

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
@ndiego
Copy link
Member

ndiego commented Feb 24, 2021

I can confirm and I am getting a similar issue when trying to add links to any navigation item that is in a template part. Again, this only seems to be an issue when editing/viewing a template part directly. If you edit the template part while viewing an entire page in the Site Editor, this issue doesn't seem to occur.

@annezazu
Copy link
Contributor Author

I'm not able to replicate this anymore with 10.2.1 and WordPress 5.7. @ndiego can you? :D If not, I'll close.

@annezazu
Copy link
Contributor Author

Ah looks like there is a PR too in progress to fully fix any remnants of this as well. I'll wait until that's handled!

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 [Block] Template Part Affects the Template Parts Block [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants