[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
Wed Nov 26 10:14:59 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 swissspidy):

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


Comment:

 This looks like a breaking change to me.

 I was just testing 6.9 RC 3 with the Web Stories plugin and noticed that I
 can no longer update settings. The plugin updates settings with a POST
 request to `wp-json/wp//settings/?some_setting_field=<newvalue>` and an
 empty body.

 This works fine in 6.8 and below. But with 6.9 I now get the `Request body
 cannot be empty.` HTTP 400 error.

 Not saying that updating settings via GET instead of POST is correct, but
 I'm sure it's not the only plugin doing this.


 Reopening for visibility.

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


More information about the wp-trac mailing list