[wp-trac] [WordPress Trac] #40697: Can't create new post by REST API but I can update existing post
WordPress Trac
noreply at wordpress.org
Tue May 9 07:33:30 UTC 2017
#40697: Can't create new post by REST API but I can update existing post
--------------------------+-----------------------
Reporter: Alaa Rihan | Owner:
Type: defect (bug) | Status: reopened
Priority: normal | Milestone:
Component: REST API | Version: 4.7.4
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+-----------------------
Changes (by Alaa Rihan):
* status: closed => reopened
* resolution: invalid =>
Comment:
I knew you will tell me that, but I can confirm I tried to access the api
url I used from browser, I get the posts as json format as it expected, so
the api url is correct, I used this code to get the api url:
{{{#!php
<?php
wp_localize_script( 'myapp', 'apiData', array(
'nonce' => wp_create_nonce( 'wp_rest' ),
'apiURL' => rest_url('wp/v2'),
) );
}}}
and I told you I can edit/delete posts without problems, this is WP bug,
please check it yourself.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40697#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list