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

WordPress Trac noreply at wordpress.org
Sun Nov 20 22:29:16 UTC 2016


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

 * owner:   => joehoyle
 * status:  new => assigned


Comment:

 I think we should support `''` as a value value, however I don't think
 `default` is a good idea. Elsewhere in the API we use null / empty strings
 to set things back to their default, also setting to `default` I believe
 actually set's it to an empty string anyway.

 In trying to fix this, I'm having some issues with our unit tests which is
 holding this up. We have an issue with the global state in the tests where
 the route is registered with the `enum`, so filtering the templates
 doesn't affect the enum - as all the endpoints are registered on
 `rest_api_init` before the tests have run, this is proving to be quite
 tricky.

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


More information about the wp-trac mailing list