Opened 13 months ago
Closed 11 months ago
#59536 closed defect (bug) (invalid)
Navigation data persists even after deleting the navigation block
Reported by: | annashopina | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | 6.1 |
Component: | General | Keywords: | has-testing-info |
Focuses: | Cc: |
Description
I found this during testing WordPress 6.4 beta, Improvements to List View’ feature
Steps to Reproduce:
- Create a new post.
- Add a navigation block to the post. This navigation block should contain links to various sections or content within the post.
- Save the post with the navigation block.
- Delete the navigation block from the post.
- Save the post without the navigation block.
- Create a new post or open the created post once more.
- Add a navigation block.
Expected Result:
The navigation block is empty and the customer can add the data.
Actual Result:
The navigation block displays data that were added previously.
Change History (8)
This ticket was mentioned in Slack in #core-test by hardikgohil. View the logs.
13 months ago
#3
@
12 months ago
Hello @annashopina and @deepakvijayan,
Welcome to WordPress Core's Trac :) Thank you for reporting the issue.
Pinging @get_dave for investigation and/or insights. Is this behavior expected? If no, thinking it needs to be reported upstream in Gutenberg.
This ticket was mentioned in Slack in #core by jorbin. View the logs.
12 months ago
#5
@
12 months ago
If this is indeed unexpected behavior, I think this might be a candidate for 6.4.1, but leaving things as is until more is known there.
This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.
11 months ago
#7
@
11 months ago
Hi. Thanks for the report.
I'm a regular contributor to the Navigation block so I'm well placed to answer this.
From what I can tell, what you describe sounds like expected behaviour. Some of this is covered in these Make Posts which you might find helpful:
- https://make.wordpress.org/core/2023/08/23/whats-new-for-navigation-in-wordpress-6-2-and-6-3/
- https://make.wordpress.org/core/2022/09/27/navigation-block-fallback-behavior-in-wp-6-1-dev-note/
The Nav block's data (menu items) is typically a wp_navigation
Post and is not stored locally to the block. We optimise for providing the most recently created menu which is why you are seeing this behaviour.
If, once reading those posts you still feel there is a bug then please feel free to let us know and I'll be happy to dive in deeper.
#8
@
11 months ago
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
- Version changed from trunk to 6.1
Thank you @get_dave for sharing those insights and confirming it is the intended behavior.
Closing the ticket as invalid
, given it's the intended behavior.
Please reopen if a change in the intended behavior is requested.
Also, changing the Version to 6.1, as the behavior was not introduced in 6.4 or 6.5.
I tested this in 6.4-beta2. I can confirm that this issue is present. Following are my findings.
The navigation block persists the data of the last created navigation block. Not sure if this is intentional or not.
Steps followed
To check further I added one more navigation(let's call it nav2) block to the same page with different navigation data. Now if I further add one more nav block. It initializes with the data from nav2.
Hence, we can confirm that the navigation block initializes with the last navigation block data.
Can someone confirm if this is intentional? If so this can be closed.