letrunghieu / wordpress-xmlrpc-client

A PHP XML-RPC client for Wordpress websites
MIT License
117 stars 43 forks source link

Insufficient arguments passed to this XML-RPC method. #26

Closed eduardodgarciac closed 8 years ago

eduardodgarciac commented 8 years ago

I am trying to make a new Post and it throws me this error "Insufficient arguments passed to this XML-RPC method."

$wpClient = new WordpressClient($domain->url, $domain->user, $domain->password); $wpClient->newPost('Tittle', 'Content');

The getProfile method works fine, so there is no problem with the credentials

Can anyone help me with this? Thanks in advance

letrunghieu commented 8 years ago

Which version of PHP do you use? There are some problems with PHP 7 that I am investigating.

eduardodgarciac commented 8 years ago

Oh I see... I'm using php 7. Well, I'm breaking my head with that error

letrunghieu commented 8 years ago

The problem is fixed, you can composer update to get the latest version of this package. Please read the release note of the version 2.5.0 here

eduardodgarciac commented 8 years ago

Thank you very much. I already tested and seems to works perfectly

clmadrazo commented 7 years ago

I have this same problem. Before upgrading to PHP7 I was working fine. I already upgraded to version 2.5 and I still have the same problem.

$wpClient = new \HieuLe\WordpressXmlrpcClient\WordpressClient($endpoint, $user, $pass, $wpLog); $options = array( 'post_status' => 'draft', 'terms_names' => array( 'post_tag' => $schedule->getPost()->getWPTagsArray(), 'category' => $schedule->getPost()->getWPCategoriesArray() ), ); $response = $wpClient->newPost($schedule->getPost()->getTitle(), $schedule->getPost()->getPostText(), $options);

array(2) { ["faultCode"]=> int(400) ["faultString"]=> string(53) "Insufficient arguments passed to this XML-RPC method." }