[wp-trac] [WordPress Trac] #38916: REST API: Can't set existing post format if theme does not support it

WordPress Trac noreply at wordpress.org
Wed Nov 23 15:06:00 UTC 2016


#38916: REST API: Can't set existing post format if theme does not support it
--------------------------+--------------------
 Reporter:  iseulde       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.7
Component:  REST API      |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+--------------------

Comment (by danielbachhuber):

 > We can ignore the update to the `format` field if the value is the same
 as what's currently saved. Does that make sense as a way to address the
 issue?

 I'm not sure introducing conditional behavior in our validation framework
 is the best way to go about this.

 I'm also not sure this is a bug. If a client doesn't want to update a
 field, it can and should omit the field from the request. If the client is
 trying to the field to a value that isn't supported, the API should
 rightfully error.

 As a corollary example to consider, what should happen if you try to
 update `template` for a Page to a template value that doesn't exist in the
 theme?

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


More information about the wp-trac mailing list