Make WordPress Core

Opened 19 months ago

Closed 19 months ago

Last modified 17 months ago

#56618 closed defect (bug) (fixed)

REST API: Wrong field checked for `has_archive` inclusion

Reported by: dlh's profile dlh Owned by: jorgefilipecosta's profile jorgefilipecosta
Milestone: 6.1 Priority: normal
Severity: normal Version: 6.1
Component: REST API Keywords: has-patch commit
Focuses: Cc:


The has_archive property was added to the REST API endpoint for post types in [54273]. However, the hierarchical field, not has_archive, is checked with rest_is_field_included() prior to including has_archive in the response.

Change History (6)

#2 @audrasjb
19 months ago

  • Milestone changed from Awaiting Review to 6.1

Let's milestone this to 6.1.

The patch looks good to me, and is pretty straightforward, so I think we're good to go with it :)

#3 @mukesh27
19 months ago

  • Keywords commit added

PR #3308 looks good to me.
Thanks @dlh

#4 @jorgefilipecosta
19 months ago

Thank you for proposing this fix and for the reviews. It was a mistake I did during the backporting and rebase. I'm going to commit the fix.

#5 @jorgefilipecosta
19 months ago

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

In 54288:

REST API: Fix check for has_archive inclusion.

Props dlh, audrasjb, mukesh27.
Fixes #56618.

Note: See TracTickets for help on using tickets.