-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Labels
[Block] Navigation LinkAffects the Navigation Link BlockAffects the Navigation Link Block[Feature] Navigation MenusAny issue relating to Navigation MenusAny issue relating to Navigation Menus[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
When you add a new navigation link block it technically also adds the id
/postTyoe
of the post/page it is linking to. This is used determine the active variation etc.
<!-- wp:navigation-link {"label":"XXX","type":"page","id":123,"url":"http://xxx.xx/xxx/","kind":"post-type"} /-->
The problem is that there is no way to unlink that navigation link block from that original post that was selected. And the ID also stays there.
So if you go into an existing navigation, update all the links and labels and then at some point delete/unpublish the original post with the ID that is still in the attributes, the navigation item will not get shown on the frontend anymore. This is because core rightly so wants to not show draft posts in the navigation.
The solution here would be to remove the id
attribute when the URL gets manually changed by the user
Metadata
Metadata
Assignees
Labels
[Block] Navigation LinkAffects the Navigation Link BlockAffects the Navigation Link Block[Feature] Navigation MenusAny issue relating to Navigation MenusAny issue relating to Navigation Menus[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended