[wp-trac] [WordPress Trac] #41604: REST API: Attempting to create or update a non-existent setting doesn't return an error response

WordPress Trac noreply at wordpress.org
Thu Jun 12 08:10:54 UTC 2025


#41604: REST API: Attempting to create or update a non-existent setting doesn't
return an error response
--------------------------------------+--------------------------
 Reporter:  johnbillion               |       Owner:  johnbillion
     Type:  defect (bug)              |      Status:  reopened
 Priority:  normal                    |   Milestone:  6.9
Component:  Options, Meta APIs        |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  rest-api
--------------------------------------+--------------------------
Changes (by Mamaduka):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 The Gutenberg e2e tests discovered a regression after r60301.

 The requests can contain global query parameters, such as `_locale`, which
 fail to pass `! empty( array_diff_key( $params, $options ) )` check:

 An actual request made by the block editor to update settings:
 `http://trunk.test/wp-json/wp/v2/settings?_locale=user`.

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


More information about the wp-trac mailing list