Skip to content

Navigation Block + Page Link Block: Create draft option shows when adding an existing page #33962

@annezazu

Description

@annezazu

Is there an existing issue for this?

  • I have searched the existing issues

Have you tried deactivating all plugins except Gutenberg?

  • I have tested with all plugins deactivated.

Have you tried replicating the bug using a default theme e.g. Twenty Twenty?

  • I have tested with a default theme.

Description

The Navigation Block's Page Link Block still shows the option to create a draft even when a page with the same title exists. This could lead to duplicated pages with the same title, which seems unnecessary.

Step-by-step reproduction instructions

  1. Add a navigation block.
  2. Add a Page Link block and start searching for a current page title.
  3. Notice that the create draft option is still visible even for a page title that exists.

Expected Behavior

I expect to not see the option to create a draft when searching for a page whose title exists. I think it would be better if it only showed when you continued typing a new page title that's not currently available.

Current Behavior

The create a draft option still exists.

Screenshots or screen recording (optional)

Visual of the problem where I have a page already published titled "Tuition" yet when I type it in the option remains to create another draft with the same title:
Screen Shot 2021-08-09 at 10 28 14 PM

Code snippet (optional)

No response

WordPress Information

WordPress 5.8.

Gutenberg Information

Gutenberg 11.2

What browsers are you seeing the problem on?

Chrome

Device Information

Desktop

Operating System Information

MacOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good First IssueAn issue that's suitable for someone looking to contribute for the first time[Block] NavigationAffects the Navigation Block[Type] EnhancementA suggestion for improvement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions