WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#35677 closed defect (bug) (fixed)

Add parent__in and parent__not_in query vars to WP_Comment_Query defaults

Reported by: danielbachhuber Owned by: boonebgorges
Milestone: 4.5 Priority: normal
Severity: normal Version: 4.4
Component: Comments Keywords: has-patch
Focuses: Cc:

Description (last modified by danielbachhuber)

Because parent__in and parent__not_in aren't included in WP_Comment_Query defaults, queries using these params are subject to an incorrect last_cached cache.

See failing build in https://travis-ci.org/WP-API/WP-API/builds/106015258, and also https://github.com/WP-API/WP-API/pull/2206

Introduced in r34205

Attachments (1)

35677.1.diff (473 bytes) - added by danielbachhuber 6 years ago.

Download all attachments as: .zip

Change History (4)

#1 @danielbachhuber
6 years ago

  • Description modified (diff)

This ticket was mentioned in Slack in #core by danielbachhuber. View the logs.


6 years ago

#3 @boonebgorges
6 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 36479:

Comments: Add 'parentin' and 'parentnot_in' to query var defaults.

Query var defaults are used to calculate a cache key. The fact that these
params were not listed among the defaults was causing cache keys to be
insufficiently specific.

Props danielbachhuber.
Fixes #35677.

Note: See TracTickets for help on using tickets.