Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mboynes opened this issue Mar 7, 2024 · 2 comments
Labels
[Block] Navigation Affects the Navigation Block [Type] Bug An existing feature does not function as intended

Comments

@mboynes
Copy link
Contributor

mboynes commented Mar 7, 2024

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

@thesandybridge
Copy link

I believe the reason for this is to prevent the menu from being updated on the frontend, classic menus could potentially be live. If the classic menu isn't set to a draft when converting to a block then it will update the frontend without the user updating the page. The confusion lies in the labeling of (draft). It seems to only be set to a draft to trigger the initial dirty state.

That is why, when going to the site editor, you will need to change the menu in order to save it. It technically is already saved since it was a conversion.

@jordesign jordesign added the [Block] Navigation Affects the Navigation Block label Mar 11, 2024
@getdave
Copy link
Contributor

getdave commented Nov 21, 2024

I tested this and agree it could be confusing. There are probably two elements to solve:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

4 participants