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 blocks doesn't update when adding, renaming pages #37712

Closed
base-creme opened this issue Jan 4, 2022 · 13 comments
Closed

Navigation blocks doesn't update when adding, renaming pages #37712

base-creme opened this issue Jan 4, 2022 · 13 comments
Labels
[Block] Navigation Affects the Navigation Block [Type] Enhancement A suggestion for improvement.

Comments

@base-creme
Copy link

Description

Navigation blocks are not working properly.
When I add, rename, remove pages, the block doesn't update its content.

Step-by-step reproduction instructions

  1. Create a menu with Gut in site editor
  2. Add pages (for instance : home, service)
  3. Modify the name + slug of a page (for instance : service to services)
  4. Save your changes

--> The menu isn't updated

  1. Create a classic menu
  2. Add pages
  3. Add the menu to the header with site editor
  4. Modify the name + slug of a page
  5. Save your changes

--> The menu isn't updated

Screenshots, screen recording, code snippet

No response

Environment info

Wordpress 5.8.2
Gutenberg 12.2.0

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

@base-creme
Copy link
Author

The only way I found to update is the following one :

  1. go to site editor, select the navigation block and hit "manage menus"
  2. delete the navigation block
  3. make changes in the classic navigation and save changes
  4. go back to site editor when you now have an error
  5. hit "create new menu" and select the modified one

@skorasaurus skorasaurus added [Block] Navigation Affects the Navigation Block Needs Testing Needs further testing to be confirmed. labels Jan 5, 2022
@getdave getdave added the [Type] Bug An existing feature does not function as intended label Jan 27, 2022
@coreyworrell
Copy link
Contributor

@base-creme That only works once. As soon as you select the already created menu in the navigation block, it duplicates it as a new menu in the database and does not sync with the original classic navigation menu.

@pattyok
Copy link

pattyok commented Aug 4, 2022

Wondering if there are plans to fix this? This issue prevents me from even considering Full Site Editing.

@draganescu
Copy link
Contributor

draganescu commented Aug 16, 2022

Howdy! So far the navigation block is not synchronized with classic menus, it only imports them, transforming a classic menu into a block menu. After the import the two things are not connected.

The navigation block supports synchronized navigation with pages, via the page list block. You can create a navigation block and add a page list block in it. As long as it is not transformed into a list of links (via the edit button) the page list block should be synced, in the sense that updates to page titles, links and hierarchy is immediately reflected.

There is still work to do on the abilities of the navigation block. For one links to posts and pages should auto update in terms of titles and links, similar to how the pages list block works - the user should be able to opt in at least on a per link basis or something.

However synchronization between classic menus and block menus is unlikely to become a feature as the import utility fulfills most of the use cases. It's not impossible for classic menu syncing to become at some point something that makes sense, depending on block theme adoption and the feedback on theme switching, but that is mostly projection.

@t-hamano
Copy link
Contributor

Maybe this issue should be tracked by #38275.
Also, I think "Needs Testing" label is no longer needed

@t-hamano t-hamano removed the Needs Testing Needs further testing to be confirmed. label Aug 20, 2022
@mrfoxtalbot mrfoxtalbot added [Type] Enhancement A suggestion for improvement. and removed [Type] Bug An existing feature does not function as intended labels Oct 10, 2022
@mrfoxtalbot
Copy link

Many long-time users will expect the navigation block to work similarly to the way classic menus work. At the same time, this is not a bug in the sense that the navigation block is working as expected. I have replaced the "bug" label with the "enhancement" one.

Do you think it makes sense to add this to the backlog of the tracking post at #38275, @getdave, or is this still too distant at this point?

Thank you!

@getdave
Copy link
Contributor

getdave commented Oct 12, 2022

Do you think it makes sense to add this to the backlog of the tracking post at #38275, @getdave, or is this still too distant at this point?

@mrfoxtalbot I think it's one of the items we should be tackling. Please do add to the tracking issue 🙏

@mrfoxtalbot
Copy link

I cannot edit the issue itself, but I added a comment. Would this make sense? Were you referring to this @getdave? Thank you!

@abcmoritz
Copy link

Holy shit, this is driving me nuts. I was wondering why this is not syncing. It would be really helpful if the navigation block syncs with the menu. The page list is absolutely no solution. The case that I need a whole list of the pages and not some specific pages is rarer than me finishing code without bugs.

@amigoow
Copy link

amigoow commented Jan 4, 2023

Menu is not even syncing when you change the slug of category. So weird!

@getdave
Copy link
Contributor

getdave commented Jan 4, 2023

This appears to be a duplicate of #18345. I'm going to close out in favour of that canonical issue and we'll go from there.

Whilst contributors are focused elsewhere, I have started a exploration of this in #46891.

@getdave getdave closed this as completed Jan 4, 2023
@Simbaclaws
Copy link

Simbaclaws commented Aug 8, 2023

I would like the ability to disable the full site editor for a client so that they can't change the look and feel of their site (not giving them the ability to break things). If I want to do this, I'm forced to use the classical menu way of defining menu's for the client. Since they want the ability to alter the menu. This means that whatever they put in the classical menu, should be synced with what is displayed in the navigation block that has that menu selected.

But since this is not the case, I have to create my own menu post type (which means we'd have another custom post type, purely for the menu system, just to circumvent having to do it all in the site editor.)

What would be a good workaround to this solution in the current use case? Maybe creating a block for each menu that goes over the classical menu system?

I'm quite lost how I should implement this, knowing that gutenberg doesn't have full support for a menu system that is easily editable by a client. Instead of having to jump into the site editor for them to change it.

@getdave
Copy link
Contributor

getdave commented Aug 8, 2023

Hi @Simbaclaws. Thank you for your question. This Issue is closed and so it's unlikely you will get much input on your question.

I would recommend you re-post it over at https://wordpress.stackexchange.com which is a preferred solution for development related queries.

Many thanks.

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] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests