Skip to content

Navigation menus can get stuck in a draft state and cannot be saved without making edits #59688

@mboynes

Description

@mboynes

Description

As described in #59685, if a user inserts a navigation block into a post and imports a classic menu, the navigation menu is inserted as a "draft" and the editor is set to a confusing dirty state with unsaved changes. If the user then proceeds to leave the screen, the menu gets stuck in that draft state and there's no way (that I've found) to save/publish that navigation menu without making edits to it, neither in the post edit screen nor the site editor.

Adding to this confusing experience, even though the menu is in a draft state, no edits to it are ever saved (again, in either the post edit screen or the site editor). The only way to save edits, that I've found, is to publish the draft, which is now possible since we modified it.

Step-by-step reproduction instructions

  1. Create a new post
  2. Insert a navigation block
  3. Import a classic menu
  4. Observe that the "Publish" button indicates there are unsaved changes because the menu is not yet saved
  5. Save a draft of the post
  6. Exit the screen, confirming that changes may be lost
  7. Resume editing the post
  8. Observe that the "Publish" button does not indicate that there are unsaved changes, even though the menu is still in draft state
  9. Go to the site editor and select the draft menu
  10. Observe that there is no way to publish the draft of the menu without making changes

Screenshots, screen recording, code snippet

stuck-in-draft

Environment info

Tested on 6.4.3 as well as 6.5 RC1

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] NavigationAffects the Navigation Block[Type] BugAn existing feature does not function as intended

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions