Skip to content

Navigation Block: Draft Page shows on front end as a broken link #29691

@annezazu

Description

@annezazu

Description

When using the navigation block, if you create a draft page, the page then displays on the front end of the site even though it's still a draft and leads to a broken link. cc @gwwar

Step-by-step reproduction instructions

These are a bit rough, apologies. I'm finding this hard to explain but the video should help!

  1. Add a navigation block
  2. Add a Link Block > Start typing a title of a page that does not exist
  3. Create a draft of that page
  4. Select "Update Design" to save changes
  5. View the front end of your site and notice that the menu item with the page draft shows despite being a draft. If you click on it in an incognito window, you'll be taken to a 404 page.

Expected behaviour

I'd expect a draft of a page to not be shown as a broken menu item.

Actual behaviour

The draft is linked to causing a broken link. However, it's not obvious it's broken as when you are logged in as an admin the page is able to be viewed. If you check in an incognito window, you'll see it's broken.

Screenshots or screen recording (optional)

nav.block.bug.mov

WordPress information

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

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions