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
Activity