Make WordPress Core

Opened 7 months ago

Closed 6 months ago

#59536 closed defect (bug) (invalid)

Navigation data persists even after deleting the navigation block

Reported by: annashopina's profile annashopina Owned by:
Milestone: Priority: normal
Severity: minor Version: 6.1
Component: General Keywords: has-testing-info
Focuses: Cc:


I found this during testing WordPress 6.4 beta, Improvements to List View’ feature

Steps to Reproduce:

  1. Create a new post.
  1. Add a navigation block to the post. This navigation block should contain links to various sections or content within the post.
  1. Save the post with the navigation block.
  1. Delete the navigation block from the post.
  1. Save the post without the navigation block.
  1. Create a new post or open the created post once more.
  1. 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.

7 months ago

#2 @deepakvijayan
7 months ago

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

  1. Created a new post
  2. Added a navigation block.
  3. Added items to the menu.
  4. Saved the post and viewed it. Everything seems to be working.
  5. Removed the navigation block. Saved and viewed the post. Navigation gone. Working fine.
  6. Added navigation back to post. It initializes with the previous data.

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.

#3 @hellofromTonya
6 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.

6 months ago

#5 @jorbin
6 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.

6 months ago

#7 @get_dave
6 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:

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 @hellofromTonya
6 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.

Note: See TracTickets for help on using tickets.