1 ericch1 Aug 01, 2006 02:07
3 ericch1 Aug 01, 2006 23:24
Thanks for the help blueyed.
I tried hitting the demo site and am getting this response from Word:
Unabled to publish this post. Most likely causes include you are not connected to the internet, your provider in unavailable, or your password is incorrect.
It looks to be just a generic error message with Word. Attaching a HTTP proxy, I see the response sent from b2e is actually:
<methodResponse>
<fault>
<value>
<struct>
<member>
<name>faultCode</name>
<value><int>809</int></value>
</member>
<member>
<name>faultString</name>
<value><string>DB error: <p>You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 3(Errno=1064)</p></string></value>
</member>
</struct>
</value>
</fault>
</methodResponse>
Let me know if you need any additional info to help debug this.
4 blueyed Aug 01, 2006 23:46
Re: "Attaching a HTTP proxy"
Can you also copy'n'paste the request(s) that get sent by word?
5 blueyed Aug 01, 2006 23:54
I think I fixed this error, please try again. However, I'd be still interested in what Word sends.
6 ericch1 Aug 02, 2006 00:34
Unfortunately I am getting another problem now. Now I can't edit existing posts at all. :(
Here's the request:
<methodCall><methodName>metaWeblog.editPost</methodName><params><param><value><string>25</string></value></param><param><value><string>admin</string></value></param><param><value><string>demopass</string></value></param><param><value><struct><member><name>title</name><value><string>Word Post 3</string></value></member><member><name>description</name><value><string><p>Another new post, permission denied?
</p><p>Making this post private now.
</p></string></value></member><member><name>dateCreated</name><value><dateTime.iso8601>20060801T20:20:12</dateTime.iso8601></value></member><member><name>categories</name><value><array><data></data></array></value></member></struct></value></param><param><value><boolean>0</boolean></value></param></params></methodCall>
and the response:
<?xml version="1.0" ?>
<methodResponse>
<fault>
<value>
<struct>
<member>
<name>faultCode</name>
<value><int>802</int></value>
</member>
<member>
<name>faultString</name>
<value><string>Permission denied.</string></value>
</member>
</struct>
</value>
</fault>
</methodResponse>
From the request, it looks like I'm passing in the correct admin/demopass account, so not sure why response is permission denied.
7 blueyed Aug 02, 2006 01:02
It was because it checked the permissions, with an uninitialized variable.
Should be fixed, again.. ;)
8 ericch1 Aug 02, 2006 01:54
Almost there blueyed. :)
My latest test, I can post as draft, update draft to published, update the post from published back to draft and back to published.
The problem I am noticing now is whenever I update a draft post, the date/time is set to null or nothing. The Date field in the posts list is empty and when I retrieve a list of past posts, the Date Modified is shown as 12/31/1969 4:00:00 pm.
Here's the draft update request:
<methodCall><methodName>metaWeblog.editPost</methodName><params><param><value><string>2</string></value></param><param><value><string>admin</string></value></param><param><value><string>demopass</string></value></param><param><value><struct><member><name>title</name><value><string>Second post</string></value></member><member><name>description</name><value><string><p>This is the second post.
</p><p>It appears on blog A only but in multiple categories.
</p><p>And now is private.
</p></string></value></member><member><name>dateCreated</name><value><dateTime.iso8601>20060801T23:11:18</dateTime.iso8601></value></member><member><name>categories</name><value><array><data></data></array></value></member></struct></value></param><param><value><boolean>0</boolean></value></param></params></methodCall>
and here's the response:
<?xml version="1.0" ?>
<!-- DEBUG INFO:
post_ID: 2
-->
<methodResponse>
<params>
<param>
<value><string>2</string></value>
</param>
</params>
</methodResponse>
Thanks for all the help!
I've looked into fixing it (and hopefully have so), but at the same time, cleaned up the code and added categories support to the metaWeblog API methods, which I think Word 2007 might use.
Please test it on the demo server (use http://demo.b2evolution.net/HEAD/blogs/xmlsrv/xmlrpc.php as URL - there's an "admin" account with password "demopass").
I might look into merging the fix parts for 1.8.1.