Skip to content

Nested notes are not deleted or trashed when parent note is #72862

@desrosj

Description

@desrosj

Description

When a note has replies and you click delete, you are presented with the following: "Are you sure you want to delete this note? This will also delete all of this note's replies."

I agree that this is the desired behavior. However, this is not the case. The child notes are not deleted at all, they only disappear because their parent note has been trashed.

To celebrate Halloween, I've created a terribly ugly Frankenstein PHPUnit test to demonstrate this behavior in WordPress/wordpress-develop#10442.

Step-by-step reproduction instructions

  1. Create a post and add a note.
  2. Add replies to the note.
  3. Delete the parent note.
  4. Observe the child notes are not deleted or trashed in the database.

Screenshots, screen recording, code snippet

No response

Environment info

No response

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

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Labels

[Feature] NotesPhase 3 of the Gutenberg roadmap around block commenting[Status] In discussionUsed to indicate that an issue is in the process of being discussed[Type] BugAn existing feature does not function as intended

Type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions