Forums

XML error when uploading new post

  1. When I upload a post (image or only text, same error) I get an error message:

    Post Upload Failed: org.xmlpull.v1.XmlPullParserException: expected ++++

    Results from http://www.barmen.nu/xmlrpc.php:

    "XML-RPC server accepts POST requests only."

    I even tried the new version Beta 2 of the Wordpress app and it posts the same error (although in a much better interface!). The error occurs both with attachments and text posts. The strangest thing is that the posts get uploaded in any case, if I go to the blog I see the post, and if I refresh in the app I get the post both in the blog list and posted as a local draft. Seems the handshake to confirm upload success is missing.

    Sometimes I get an added error of which I cannot understand. All categories on Wordpress gets reset to Unknown and I get an error in the app when I try to refresh categories. I have nailed the fix for this, and it is basically to restart the mysql server.

    Just to note, I tried disabling all plugins to eliminate, and the error still happens. So now I am more or less stuck!

    I am running Wordpress 3.2.1 on Gentoo Linux with Apache 2.2.20 and PHP5.3, MySQL 5.1.56. PhPinfo can be provided if wanted.

    I will be happy getting developers access to debug. My email is stian at barmen dott nu. thanks!

    Now I will start upgrading all gentoo packages to latest version to see if that helps ....

  2. Oh yes ... forgot one thing.

    I have another fresh install of wordpress on same server (skoglund.barmen.nu) that my sister is using. This one works just fine ... same physical server! (oh ... it is virtual but hey! you know what I mean!)

  3. I can continue to answer myself.

    Just enabled logging in xmlrpc.php and got the following response in the log file:

    2011-11-28 13:47:02 Input: <?xml version='1.0' ?><methodCall><methodName>metaWeblog.newPost</methodName><params><param><value><i4>1</i4></value></param><param><value><string>stian</string></value></param><param><value><string>deleted</string></value></param><param><value><struct><member><name>mt_keywords</name><value><string></string></value></member><member><name>post_type</name><value><string>post</string></value></member><member><name>title</name><value><string>Test5</string></value></member><member><name>post_status</name><value><string>publish</string></value></member><member><name>description</name><value><string>Test

    </string></value></member></struct></value></param><param><value><boolean>0</boolean></value></param></params></methodCall>

    2011-11-28 13:47:02 Output: Posted ! ID: 5711

    I cannot see anything wrong, maybe you can?

    Other logging is only a line from access.log apache like so:
    89.9.80.49 - - [28/Nov/2011:14:50:07 +0100] "POST /xmlrpc.php HTTP/1.1" 200 358 "-" "wp-android/2.0-beta"

    Suggestions please? This blog is quite old and has been upgraded for years. Never had problems like this before ... :|

  4. Have you tried switching to the default WP theme as well? Sometimes themes can interfere with XMLRPC.

  5. Tried it just now, reverted to default theme, disabled all plugins but still it fails with the error. :( this is frustrating.

    Any way to debug or log the respons on the Android side? There must be some kind of response it is missing.

    The DB error I was seeing earlier seems to be gone luckily. No more category hang after I updated Apache/Mysql, so at least that helps. Now just to get it to not throw the error on the droid ... it does actually post the news ... if it just stopped nagging ;)

    and thanks for replying!

  6. Same issues here. Re-installed, set default theme, disabled all plugins, and re-installed. My phone gives me an error, but the post makes it to my site. I finally tried uninstalling the app and re-installing it. Still gives the error. I'm not sure what else to try.

    WordPress: 3.3; self-hosted
    Phone: HTC Thunderbolt
    Android Version: 2.3.4
    WordPress for Android Version: 2.0.1

  7. I just enabled logging on xmlrpc.php as well and have pretty much the same response back as corvy:

    2012-01-03 14:28:10 Input: <?xml version='1.0' ?><methodCall><methodName>metaWeblog.newPost</methodName><params><param><value><i4>1</i4></value></param><param><value><string>Ronnie</string></value></param><param><value><string>******</string></value></param><param><value><struct><member><name>mt_keywords</name><value><string></string></value></member><member><name>post_type</name><value><string>post</string></value></member><member><name>categories</name><value><array><data><value><string>Technology</string></value><value><string>Thoughts on Life</string></value></data></array></value></member><member><name>title</name><value><string>Test 2</string></value></member><member><name>wp_password</name><value><string></string></value></member><member><name>post_status</name><value><string>draft</string></value></member><member><name>description</name><value><string>Testing with this...

    </string></value></member></struct></value></param><param><value><boolean>0</boolean></value></param></params></methodCall>

    2012-01-03 14:28:10 Output: Post cats: array ( 0 => 'Technology', 1 => 'Thoughts on Life', )

    2012-01-03 14:28:11 Output: Posted ! ID: 1107

    I cleared out my password. Otherwise, that is untouched straight from the log file.

  8. Gr8! At least I am not alone!

    Is your site an old install or a fresh one?

  9. It is an old one. Funny thing is, I just set up a site for my Cub Scout unit running 3.3 a few weeks ago and it is fine. No issues whatsoever. I can post on my phone without any errors. The one I'm having issues with has been up for at least a year and a half and it's having some growing pains. The posts make it into the system, but I get this error in my status bar...

  10. Yes. Same as me. My sister just got a fresh site on the same server as my old site and that works fine, my old upgraded one is trouble :-\

  11. Hi all, i have exact the same problem. I also have two wordpress installations on the same server. One works fine, one throws the above error. On android and on iphone app. Have you found a solution yet?

  12. I have still this problem. If any devs want access to my site for testing I am game ... please just drop me a message and I will facilitate. It is very irritating and basically killing this wonderful app for me!

  13. Can't you just dismiss the notification since the post gets uploaded anyways? You can shoot over a some test account details for your blog to mobile at automattic dot com and I can take a look.

  14. New user created. Blog name is http://www.barmen.nu on both http and https. Thanks for looking into it!

  15. Screens for further proof and doc. No progress on this problem?
    screenshot

  16. @corvy, thanks for sending over the account. Here's what your blog is printing out:

    <b>Warning</b>: strpos() [function.strpos]: Empty delimiter in <b>/var/www/barmen/htdocs/wp-includes/class-wp-xmlrpc-server.php</b> on line <b>2470</b>

    You'd better make sure that your class-wp-xmlrpc-server.php file is unaltered and up to date. Also, if you disable PHP warning messages you shouldn't have this problem any longer.

  17. Cheers for trying to help out With this mrroundhill!

    Sadly I did not come to a solution. I tried to refresh the file class-wp-xmlrpc-server.php with a totally fresh one from Wordpress download but still the same error is thrown. Next I did as suggested to remove the warning Messages but even that would not work. I confirmed it has taken effect With phpinfo.

    So sadly I am back to [] 1 again. ;)

    Please do try again With more help! I can also give you ssh Access if that would help you any. Note that on the same server I have http://www.skoglund.barmen.nu … on this site it works. Very strange, but my primary blog is very old. Upgrading since 2005 … might be Source of the problem :|

    Again! Thanks alot for taking the problem seriously and helping out!!

  18. You could try this solution, but you have to change a core file which will be lost the next time you update WP:

    http://wordpress.org/support/topic/windows-live-writer-no-go-with-wp-312?replies=8

  19. mrroundhill, I can confirm that this did the trick :) I just added the middle line below in /wp-includes/class-wp-xmlrpc-server.php:

    foreach ( $attachments as $file ) {
    if($file->guid && !($file->guid == NULL))
    if ( strpos( $post_content, $file->guid ) !== false )

    Very cool, thanks a lot! :) Anyway this can be fixed by the android app or do we need to file it as a bug report with wordpress? Also ... why does this error only happen on the old site, not the newer one?

Topic Closed

This topic has been closed to new replies.


About this Topic

Tags