[wp-trac] [WordPress Trac] #27090: Wordpress XML-RPC method returns error but still posts
WordPress Trac
noreply at wordpress.org
Tue Feb 11 09:17:03 UTC 2014
#27090: Wordpress XML-RPC method returns error but still posts
--------------------------+-----------------------------
Reporter: IndigoJo | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: XML-RPC | Version: 3.8.1
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
I am the developer of a desktop XML-RPC client for posting entries to
blogs, and recently implemented the wp.newPost method (I had previously
used the legacy metaWeblog.newPost method). I have found that when I post
an entry with the status 'publish', WordPress often returns an error but
still posts the entry. This means that it doesn't return an entry number
for the post, so I cannot use the app to submit subsequent edits for the
post. The legacy methods, when they returned an error, did not post the
entry.
This is the entry I submitted this morning:
{{{
<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>wp.newPost</methodName>
<params>
<param>
<value>
<string>1</string>
</value>
</param>
<param>
<value>
<string>mattsmith</string>
</value>
</param>
<param>
<value>
<string>(password omitted)</string>
</value>
</param>
<param>
<value>
<struct>
<member>
<name>post_type</name>
<value>
<string>post</string>
</value>
</member>
<member>
<name>post_status</name>
<value>
<string>publish</string>
</value>
</member>
<member>
<name>post_title</name>
<value>
<string>Bye-byePad</string>
</value>
</member>
<member>
<name>post_content</name>
<value>
<string><p><img src="http://www.blogistan.co.uk/blog/images
/ipad-amazon-return.jpg" title="My iPad, packaged for return" alt="Picture
of a white package sealed with packing tape with a label addressed to
Amazon" style="float: right; margin-left: 5px; margin-bottom: 5px" />Well,
I'm sending my iPad back to the vendor today. Amazon's policy is that an
item is returnable for about a month, and I've had mine a week and a half
(although I made this decision last Saturday, but have only just got round
to printing out the return labels and packing it up).</p>
<p>There are two reasons why I'm doing this. The most important is that
I can't tolerate the keypad. It takes ages to type things that would take
much less time on an Android tablet, simply because the better predictive
text on Android saves you multiple keypresses on a screen that you can't
touch-type on because it's too small. And there's just no alternative.
Seriously, anyone migrating from Android is going to run up against this
problem, and my advice is not to bother.</p>
<p>The second is that it won't connect to certain wi-fi networks, and
the reason I suspect is a bug which is preventing it sending passwords
correctly on some forms (it did the same when logging into my own blog).
You wouldn't think this was huge, but I've already got a tablet and that
works fine -- £300 is too much to pay for a device that doesn't work
properly, and doesn't allow you to find ways round its limitations.</p>
<p>As for what I'm going to replace it with, I've been looking at the
LG G-Pad, which costs about £50 less and has a similar size screen
(although it's longer and the resolution is slightly less), but I might
wait until April when it's rumoured that Google will be bringing out a
Nexus 8. I'd ideally like to try it in a shop before buying it, but none
of the major high-street computer shops stock it. What I'd really like is
an Android tablet with the same dimensions and screen resolution, but
there doesn't seem to be one and the shops seem to be selling Android
tablets on the basis that they're cheap, not that they're good.</p>
</string>
</value>
</member>
<member>
<name>comment_status</name>
<value>
<string>open</string>
</value>
</member>
<member>
<name>ping_status</name>
<value>
<string>closed</string>
</value>
</member>
<member>
<name>terms</name>
<value>
<struct>
<member>
<name>category</name>
<value>
<array>
<data>
<value>
<string>38</string>
</value>
</data>
</array>
</value>
</member>
</struct>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodCall>
}}}
I'm using WordPress 3.8.1. My server logs do not reveal the source of this
error and I don't have any error log plugin. The app uses the Qt network
API and the error is an "Unknown Content Error", but I was unable to
extract an HTTP error code from the content of the reply. None of the
conditions for the three errors listed on the codex page for the wp API
apply, and if they did, why would it post the entry?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27090>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list