Make WordPress Core

Opened 4 months ago

Closed 4 months ago

#64152 closed defect (bug) (fixed)

REST comments endpoint does not return children for notes

Reported by: adamsilverstein's profile adamsilverstein Owned by: adamsilverstein's profile adamsilverstein
Milestone: 6.9 Priority: normal
Severity: normal Version: 6.9
Component: REST API Keywords: has-patch has-unit-tests commit
Focuses: Cc:

Description

When requesting the notes comment type from the WP_REST_Comments_Controller, children are not returned. This works correctly with regular comment types.

I have PR prepped with tests to correct this - the fix was to updated the get_children() call to include the parent comment's type.

Change History (5)

This ticket was mentioned in PR #10420 on WordPress/wordpress-develop by @adamsilverstein.


4 months ago
#1

  • Keywords has-patch has-unit-tests added

@Mamaduka commented on PR #10420:


4 months ago
#2

Would also include the patch from https://github.com/WordPress/gutenberg/pull/72561 here. I was planning to create a sync PR, but I think it makes sense to do it here.

@adamsilverstein commented on PR #10420:


4 months ago
#3

I am closing this ticket in favor of https://github.com/WordPress/wordpress-develop/pull/10405 - I moved the fix and unit test over to that PR since the issue being fixed is introduced in that PR.

#4 @adamsilverstein
4 months ago

  • Keywords commit added

#5 @adamsilverstein
4 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 61105:

Editor: Notes should not appear in the context of comments.

Prevent notes from inadvertently showing up in the context of comments - including on the Dashboard recent comments widget and the “Mine” count on the Comments page. Notes are stored as a custom ‘note’ comment type and this change ensures the note type is only returned when explicitly requested, or when ‘all’ types are requested.

The query for note children is modified to return all child notes. This fixes an issue where children were no longer being returned for the ‘note’ type.

Also fixes https://github.com/WordPress/gutenberg/issues/72548.

Props adamsilverstein, timothyblynjacobs, shailu25, peterwilsoncc, westonruter, mamaduka, kadamwhite.
Fixes #64145.
Fixes #64152.

Note: See TracTickets for help on using tickets.