Make WordPress Core

Opened 3 years ago

#54125 new defect (bug)

Rest API tax_relation=OR doesn't seem to work correctly

Reported by: roverlap's profile roverlap Owned by:
Milestone: Awaiting Review Priority: normal
Severity: major Version: 5.8
Component: REST API Keywords:
Focuses: rest-api Cc:


Let's say we have posts of a custom post type.

Post 1 has custom-tax1 with ID1 and custom-tax2 with ID2.
Post 2 has custom-tax2 with ID2.
Post 3 has custom-tax1 with ID3.
Post 4 has no custom taxonomies attached.

When querying


it returns only Post 1 as expected.


returns Post 1 and Post 2 as expected



I expect it to return Post 1 and Post 2 as well, but instead it returns all 4 Posts. As soon as tax_relation=OR is added to the query, it seems all prior tax queries are just ignored.

Unless I'm misreading this and it should somehow work differently.

Change History (0)

Note: See TracTickets for help on using tickets.