alexjamesbrown / JoeBlogs

Wordpress / Metaweblog API Wrapper
53 stars 40 forks source link

Editpost return error "invalid postid" #26

Open veryrobin opened 11 years ago

veryrobin commented 11 years ago

Editpost return error "invalid postid"!!! @wordpress 3.5.1

alexjamesbrown commented 11 years ago

Do you have any more detail?

veryrobin commented 11 years ago

The error detail info same as "https://github.com/alexjamesbrown/JoeBlogs/issues/21"

veryrobin commented 11 years ago

I think I found the problem.

The JoeBlogs.XmlRpcInterfaces.IWordPressXmlRpc 86 Line code: [XmlRpcMethod("wp.editPost")] bool EditPost(int postid, string username, string password, XmlRpcPost content, bool publish);

The wordpress wp.editPost api : Parameters int blog_id string username string password int post_id struct content: See #wp.newPost for valid set of fields. Only needs to contain fields that you wish to modify; all other fields will retain their current values.

The JoeBlogs.WordPressWrapper Editpost function code: public virtual bool EditPost(int postID, Post content, bool publish) { return _wrapper.EditPost(postID, Username, Password, Map.From.Post(content), publish); }

So:parameters error. don't have blog_id and post_id position error。

veryrobin commented 11 years ago

Yeah,I got it! Modify The JoeBlogs.XmlRpcInterfaces.IWordPressXmlRpc 86 Line code:"[XmlRpcMethod("wp.editPost")]" to [XmlRpcMethod("metaWeblog.editPost")].

alexjamesbrown commented 11 years ago

Are you able to commit this into the git repository as a a pull request?

On 27 May 2013 08:17, veryrobin notifications@github.com wrote:

Yeah,I got it! Modify The JoeBlogs.XmlRpcInterfaces.IWordPressXmlRpc 86 Line code:"[XmlRpcMethod("wp.editPost")]" to [XmlRpcMethod("metaWeblog.editPost")].

— Reply to this email directly or view it on GitHubhttps://github.com/alexjamesbrown/JoeBlogs/issues/26#issuecomment-18485535 .

veryrobin commented 11 years ago

I try it........

simon-duvall commented 10 years ago

Actually, looks like metaWeblog.editPost was never implemented.