Gutenberg: Navigation Block adds an empty link for untitled pages

Created on 3 Dec 2019  路  3Comments  路  Source: WordPress/gutenberg

Describe the bug
When creating a navigation block from all top pages, if there are untitled pages, the links to these pages not added.

To reproduce
Steps to reproduce the behavior:

  1. Make sure you have at least 1 page published with no title.
  2. Add a Navigation Block to a page.
  3. Click on "Create from all top pages"
  4. A menu item is added for the untitled page but it doesn't have a link to the page like the other pages.

Expected behavior
I would expect that the link to the page would be pulled just like it does for pages with titles. I also find that it would be more clear if instead of "Add link" the menu item was named "Untitled" just like it appears for untitled pages.

Screenshots
I recorded this video to show:

https://d.pr/v/kqxxCc

Good First Issue [Block] Navigation [Status] In Progress

Most helpful comment

it sounds reasonable to match (no title) from other places 馃憤

All 3 comments

I would expect that the link to the page would be pulled just like it does for pages with titles.

I can see that the link is actually pulled correctly there:

untitled top level page nav link

Could you confirm, @guicmazeredo?

it would be more clear if instead of "Add link" the menu item was named "Untitled" just like it appears for untitled pages.

Should we use (no title) instead of Untitled as we currently do for posts without titles? I'd also suggest to prepend the post number to (no title) as it's currently done in the Primary Menu:

image

Adding the post number should become possible when the https://github.com/WordPress/gutenberg/pull/18641 is in.

it sounds reasonable to match (no title) from other places 馃憤

Was this page helpful?
0 / 5 - 0 ratings