[wp-trac] [WordPress Trac] #38412: cannot update or delete user, term or comment meta via REST API

WordPress Trac noreply at wordpress.org
Wed Nov 2 20:59:07 UTC 2016


#38412: cannot update or delete user, term or comment meta via REST API
----------------------------------------+-----------------------
 Reporter:  tharsheblows                |       Owner:  rmccue
     Type:  defect (bug)                |      Status:  assigned
 Priority:  normal                      |   Milestone:  4.7
Component:  REST API                    |     Version:  trunk
 Severity:  normal                      |  Resolution:
 Keywords:  needs-unit-tests has-patch  |     Focuses:
----------------------------------------+-----------------------

Comment (by tharsheblows):

 This includes a patch to class-wp-rest-comments-controller.php where you
 couldn't update comment meta if you didn't update the comment.

 There are also working unit tests for each object type. I haven't gone
 through and pruned these, there is definitely a massive amount of
 redundancy. I'm not sure if you'd rather be redundant or combine these
 into one file with only `test_set_value()` for each object type. The meta
 passes through the object type `update_item` function on its way to being
 updated so that should stay in as those `update_item` functions are all a
 little different (eg the patch needed in class
 WP_REST_Comments_Controller)

 @boonebgorges I was unsure how to make the test in tests/rest-api/rest-
 term-metafields.php lovely like these
 https://core.trac.wordpress.org/changeset/38975 and I apologise for that
 and the decided lack of frugal gaze in general.

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


More information about the wp-trac mailing list