[wp-trac] [WordPress Trac] #34399: WP API 1.2 endpoints don't work with latest WP core master

WordPress Trac noreply at wordpress.org
Thu Oct 22 18:23:06 UTC 2015


#34399: WP API 1.2 endpoints don't work with latest WP core master
--------------------------+-----------------------------
 Reporter:  mnelson4      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  REST API      |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 There seems to be a conflict between the WP API 1.2 plugin and the WP API
 code in latest core.
 When the WP API 1.2 plugin is active, a request made to the index works
 fine, and lists the WP API 1.2 endpoints fine, but they all return 404
 resopnses.

 Eg a request to http://src.wordpress-develop.dev/wp-json/ returns
 {{{
 {
     "name": "admin",
     "description": "Just another WordPress site",
     "URL": "http://src.wordpress-develop.dev",
     "routes": {
         "/": {
             "supports": [
                 "HEAD",
                 "GET"
             ],
             "meta": {
                 "self": "http://src.wordpress-develop.dev/wp-json/"
             }
         },
         "/posts": {
             "supports": [
                 "HEAD",
                 "GET",
                 "POST"
             ],
             "meta": {
                 "self": "http://src.wordpress-develop.dev/wp-json/posts"
             },
             "accepts_json": true
         },
 ...
 }}}

 but a request to
 http://src.wordpress-develop.dev/wp-json/posts returns

 {{{
 [
     {
         "code": "rest_no_route",
         "message": "No route was found matching the URL and request
 method",
         "data": {
             "status": 404
         }
     }
 ]
 }}}

 It was possible to have WP API 1.2 plugin and WP API 2.0 plugin active
 simultaneously (although you needed to add a few lines of code mentioned
 here: http://jrdk.nl/blog/2015/05/running-wp-api-1-2-2-0-beta-side-by-
 side/), so the plan is to have WP API 1.2 should work fine with the WP API
 in core right?
 Ideally, folks using the WP API 1.2 should be able to continue using it
 with 4.4, using the same endpoints (ie maybe the index page should list
 endpoints from both WP API 1.2 and 2.0 when its active)

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34399>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list