Hi,
I've tried to update a post via:
$post = $api->posts->create(
array(
'title' => 'Test Article ' . date('c'),
'content_raw' => 'Test Article Description ' . date('c'),
'date' => date('c', time()),
'status' => 'publish',
'comment_status' => 'closed'
)
);
var_dump($post);
$ret = $post->update(
array(
'title' => 'Test Article Updated ' . date('c'),
'content_raw' => 'Test Article Description Updated ' . date('c'),
)
);
var_dump($ret);
I get the following error:
PHP Fatal error: Uncaught exception 'Requests_Exception_HTTP_412' with message '412 Precondition Failed' in [...]vendor/rmccue/requests/library/Requests/Response.php:92
Any ideas why?
Thanks!
EDIT:
When I debug the Request it looks like the API throws up the following error:
There is a revision of this post that is more recent.
Which does not really make sense, because I just added the entry two lines earlier, does it?
Hi,
I've tried to update a post via:
I get the following error:
Any ideas why?
Thanks!
EDIT:
When I debug the Request it looks like the API throws up the following error:
There is a revision of this post that is more recent.Which does not really make sense, because I just added the entry two lines earlier, does it?