[wp-trac] [WordPress Trac] #50012: REST API: Fields filter does not work with "object" collection responses

WordPress Trac noreply at wordpress.org
Tue Jun 3 23:36:24 UTC 2025


#50012: REST API: Fields filter does not work with "object" collection responses
-------------------------------------------------+-------------------------
 Reporter:  TimothyBlynJacobs                    |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  REST API                             |     Version:  4.8
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-unit-tests has-      |     Focuses:
  test-info                                      |
-------------------------------------------------+-------------------------
Changes (by SirLouen):

 * keywords:  has-patch needs-testing has-unit-tests => has-patch needs-
     unit-tests has-test-info


Comment:

 == IMPORTANT NOTE
 Please, if you are reading this before 6th of June 2025: **don't solve
 this issue**
 I want to have it available for WordCamp Europe 2025 Contributors day (6th
 June 2025)

 == Test Report
 === Description
 🟠 This report can't fully validate that the patch works as expected.

 Patch tested: https://github.com/WordPress/wordpress-
 develop/pull/8891.diff

 === Environment
 - WordPress: 6.9-alpha-60093-src
 - PHP: 8.2.28
 - Server: nginx/1.27.5
 - Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
 - Browser: Chrome 137.0.0.0
 - OS: Windows 10/11
 - Theme: Twenty Twenty 2.9
 - MU Plugins: None activated
 - Plugins:
   * Test Reports 1.2.0

 === Testing Instructions
 As explained in the OP message:
 1. Simply run `/wp-json/wp/v2/taxonomies?_fields=name`
 2. 🐞 Result: An empty JSON

 === Expected Result
 1. It should provide a key:value format with the stored name for each
 taxonomy available.

 === Actual Results
 1. ✅ Issue resolved with patch.
 2. 🟠 Unit tests are not providing coverage to the issue

 === Additional Notes
 - Unit tests are testing for the general case, but not for the specific
 case this issue is being reported

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50012#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list