Skip to content

Move navigation error state to the inspector #44486

@draganescu

Description

@draganescu

Description

Originally found by @jordesign this is a Gutenberg UX bug not a theme implementation issue. There is no clear programmatic fix, I think we need a better state for this edge case:

Step-by-step reproduction instructions

  • user has no pages
  • user has no menus
  • user switches to a block theme
  • user sees the error message: "Page List: Cannot Retrieve Pages." in the editor
  • nothing is rendered on the front end

Screenshots, screen recording, code snippet

Editor

Screenshot 2022-09-27 at 09 44 15

Rendered site

Screenshot 2022-09-27 at 09 44 45

Proposed solution

Image

Situation: the menu that’s ref’ed is deleted.

Result: Page List is shown in the canvas, an error message is shown in the inspector, with two buttons:

“Keep pages”, it keeps the page list, removes the ref, marks the document dirty.
“Create menu”, creates a new menu, updates the ref, marks the document dirty.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs DevReady for, and needs developer efforts[Block] NavigationAffects the Navigation Block[Block] Page ListAffects the Page List Block[Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    Status

    Next

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions