-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Labels
[Block] NavigationAffects the Navigation BlockAffects the Navigation Block[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
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!
- Add a navigation block
- Add a Link Block > Start typing a title of a page that does not exist
- Create a draft of that page
- Select "Update Design" to save changes
- 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 BlockAffects the Navigation Block[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended