WordPress Error Using Desktop Client

Friday, January 7th, 2011 | Technical | Scott Randall

I’ve been struggling for the past few days with a fairly unusual error.  In hopes of increasing blog posts, I purchased MarsEdit — a desktop blog client which can be used while disconnected from the internet.  What better way of killing time on an airplane.  Anyway…

The first step in using the desktop blog client was to ensure that XML-RPC was enabled.  This setting can be found in the Settings / Writing / Remote Publishing section of the WordPress administration module.  After checking the XML-RPC checkbox and clicking the Save Changes button, I figured I’d be home free.  Let the blogging begin!

WordPress XML-RPC Remote Publishing
Remote Publishing XML-RPC Setting

Unfortunately, that wasn’t the case.  When opening MarsEdit and attempting to Refresh and download the most recent posts, I kept receiving the following error:

XML-RPC Response Parsing Failed
The operation couldn’t be completed.  Opening and ending tag mistmatch:  methodResponse line 2 and MethodResp

MarsEdit XML-RPC Error
ERROR: XML-RPC Response Parsing Failed

I seemed to spend hours reviewing WordPress Settings — to no avail.  Ultimately, the key was buried within the MarsEdit Network Log (which can be found under the Window menu in MarsEdit).  Upon review of the file, part of the closing </methodResponse> line was missing:

Missing </methodResponse>
MarsEdit Network Log

As it turned out, this code is generated via the class-IXR.php file which can be found within the \wp-includes folder.  The XML-RPC Response Parsing Error was resolved by doing the following:

  1. Using an FTP client, locate and download the .\wp-includes\class-IXR.php file to your local computer.
  2. Open the class-IXR.php using a text editing application.
  3. Search for “class IXR_Server {“.
  4. Once located, scroll down to the first instance of </methodResponse> (approximately 30 lines down).
  5. Immediately following the </methodResponse> tag, there should be a blank line followed by EOD;
    Original Method Response Code
  6. Add five additional hard returns, thereby increasing the blank space between </methodResponse> and EOD;
    Corrected MethodResponse Code
  7. Save the class-IXR.php file and, using an FTP client, upload the file to .\wp-includes overwriting the original file.
  8. Problem Solved!

By increasing the blank space, the XML stream arrives intact.

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Page 1 of 11

Leave a Reply