[wp-trac] [WordPress Trac] #55600: Can't save registered post meta field of type string that equals registered default value via REST API

WordPress Trac noreply at wordpress.org
Tue Jul 16 01:04:32 UTC 2024


#55600: Can't save registered post meta field of type string that equals registered
default value via REST API
-------------------------------------------------+-------------------------
 Reporter:  kraftner                             |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  reopened
 Priority:  normal                               |   Milestone:  6.7
Component:  Options, Meta APIs                   |     Version:  5.5
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests needs-dev-  |     Focuses:  rest-api
  note 2nd-opinion                               |
-------------------------------------------------+-------------------------
Changes (by dmsnell):

 * keywords:  has-patch has-unit-tests => has-patch has-unit-tests needs-
     dev-note 2nd-opinion
 * version:   => 5.5
 * milestone:  Awaiting Review => 6.7


Comment:

 @kraftner thanks for your patience. I've finally dug in and verified
 everything you said. I think it's nice to note that the additional 500s
 are resolved now, though as you point out, there remains a concurrency
 issue with updating multiple values, as any failure caused an interruption
 and failure for the entire request, even when updates have been partially
 applied. a good earmark for another ticket.

 It does seem like #43941 is the culprit which introduced this bug, and the
 explanation seems to fit the code change. Also, the cause explains why the
 REST API behavior is different than when calling `update_` methods
 directly. Thank you for detailing the cause, fixing the bug, and adding
 tests.

 Since it appears like the original code was in 5.5 I've marked this as a
 bug in that release; someone can verify that this is correct. I'm
 requesting a second opinion from anyone more familiar with the REST API to
 verify, perhaps someone from the original ticket would like to review it:
 cc: @spacedmonkey @TimothyBlynJacobs @flixos90 since you seemed more
 involved when this was introduced.

 If nobody has objection I'll try and ensure this gets into 6.7.

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


More information about the wp-trac mailing list