[wp-trac] [WordPress Trac] #38877: REST API - Unable to update page when default template used.

WordPress Trac noreply at wordpress.org
Tue Nov 22 16:36:41 UTC 2016


#38877: REST API - Unable to update page when default template used.
--------------------------------------+------------------------
 Reporter:  lucasstark                |       Owner:  rmccue
     Type:  defect (bug)              |      Status:  reviewing
 Priority:  normal                    |   Milestone:  4.7
Component:  REST API                  |     Version:  trunk
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  rest-api
--------------------------------------+------------------------

Comment (by joehoyle):

 > This is the opposite of how we handle type in the Comments Controller,
 where we change '' to comment. If we were to change '' -> default here, we
 would be consistent.

 I don't agree with this - the value is actually "comment", the value of
 "template" is never "default". The `template` field is somethat can have
 an relation set to a page-template, comment type is not the same in this
 regard.

 Also, I added patch with passing tests, because of how the available
 templates affect the route's `enum` I had to provide a way to register the
 route.

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


More information about the wp-trac mailing list