WordPress XML-RPC Issues

After upgrading my wordpress blog I could not connect my Windows Live Writer anymore. Funny enough it will worked with my other blog (blog.supertext.ch). The only difference that I could find, was that remy.supertext.ch was configured to use iso-8859-1 and blog.supertext.ch used utf-8. But changing that did not actually help. Could be that the issue is some info that is still in the database.

Using the WordPress iPhone App, I got the following error:

NSXMLParserErrorDomain error 73

Does not really help either. But I found some posts, suggesting all kind of things that all didn’t apply or work.

Now, getting a little desperate, I installed Fiddler (which is really an awesome tool) and discovered that if I rerun the rpc call that Windows Live Writer is doing, I get a Content-Length mismatch Error:


Here is the request in raw form, you can try it yourself to see what results you get. Password/Username do not matter for the test, but you have to set the POST and Host value correctly:

POST http://blog.yourhost.ch/xmlrpc.php HTTP/1.1
Accept: */*
Accept-Language: en-US, en, *
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Writer 1.0)
Content-Type: text/xml
Host: blog.yourhost.ch
Content-Length: 491
Connection: Close

<?xml version="1.0" encoding="utf-8"?>

I don’t really have an idea on how to fix this for real, but what helped is to just add 2 to the length of the response. Edit the class-IXR.php file from the wp-includes directory on line 396. I’m using WordPress Version 2.9.2

function output($xml) {
    $xml = '<?xml version="1.0"?>'."\n".$xml;
    $length = strlen($xml);
    header('Connection: close');
    header('Content-Length: '.$length  + 2);
    //+2 Solves the Live Writer issue
    header('Content-Type: text/xml');
    header('Date: '.date('r'));
    echo $xml;

Just FYI:
I’m using IIS 6.0 on Windows 2003.

Ähnliche Beiträge

8 Kommentare zu “WordPress XML-RPC Issues”

  • Robert Ford am 20. May 2010 7:54 pm Uhr

    You have no idea how grateful I am for finding this post. I’ve been trawling the web and battering my head against the wall with this one. Eventually searching for “NSXMLParserErrorDomain error 73” iphone led me here.

    I too am using windows hosting and have no clue about the cause. I’ve tried fresh installs and disabling plugins but this is the first thing I’ve found that works. It’s strange though as I host another blog in the same version of WordPress on the same hosting platform with the same setting and have had no issue.

    Anyway thanks again and if you get any updates please let me know.

  • Remy Blaettler am 21. May 2010 5:20 am Uhr

    Funny enouogh, I also have two blogs and one works perfectly and the other one does not. Did you check if there is/was a difference in how you setup the encoding?

  • Robert Ford am 21. May 2010 5:28 am Uhr

    I’ve compared all the setting between the two sites and found no difference. I’ve not looked at the encoding. Can you be more specific to the encoding you are referring to please?

    One thing I have noticed is some random characters appearing in the redirect from the login to the dashboard. These characters are reminiscent of page encoding I’ve seen in the past. What I don’t understand though is why I would get this on one site and not the other. I downloaded WP 2.9.2 last night a re-uploaded the core files and the result is the same.

  • Remy Blaettler am 21. May 2010 9:40 am Uhr

    Under Settings – Reading Settings – Encoding for pages and feeds there is the setting. I had that set to iso-8859-1 in the blog that created the issues and to utf-8 on the one that worked. But changing the setting did not help.
    I’m also on version 2.9.2, but I don’t see any weird characters on the dashboard.

  • Robert Ford am 21. May 2010 9:47 am Uhr

    Both of mine are set to utf-8. I manage to copy the random characters on the redirect – .

  • Robert Ford am 21. May 2010 9:51 am Uhr

    This article (http://forum.joomla.org/viewtopic.php?f=309&t=275353) defines the character as being the bite order mark and is definitely to do with encoding.

    Problem is these characters are coming from the admin section and not files I’ve edited in a 3rd part editor. The same wordpress files were uploaded to both sites.

  • Remy Blaettler am 25. May 2010 5:27 am Uhr

    Same here, even copied the files from one directory to the other. To be honest, I really have no idea where this issue is coming from. I guess we wait for the next update and see if it is still the same.

  • blogger.getUsersBlogs method received from the blog server was invalid am 13. July 2011 4:40 pm Uhr

    […] But then I remembered that I had a similar issue a while back. I wrote about it in the post WordPress XML-RPC Issues. […]

Leave a Reply

Your email address will not be published. Required fields are marked *