I have been using WordPress for the past couple of years, and I’m pretty happy. It certainly makes writing new articles for this site nice and easy. To make life even easier, as I’m scouring the web for useful bits of information, I often want to blog some interesting site there and then. To do this, I’ve been using a convenient little extension for Firefox, called ScribeFire.

However, over the past few weeks I’ve started to have trouble – first of all ScribeFire started to report errors in the API calls, and then when I tried to reregister with my site, it reported that my username and password were incorrect.

Smelling an upgrade rat, I started to track down 2 possible causes – a new version of the ScribeFire extension (1.4.2), or a recent upgrade to WordPress (2.2.2).

To help track things down, I obtained a copy of the PHP XMLRCP 2.2 library, and built a simple wordpress xmlrpc test script (which can be found here if you are interested).

What this told me was that WordPress was rejecting any xmlrpc calls containing newline characters (\n). To fix this, I just tracked back into the xmlrpc.php file, and then up to the wp-includes/class-IXR.php library. Inside this standard library the IXR_Message is instantiated as follows:

function IXR_Message ($message) {
$this->message = $message;
}

To strip out the newlines, this is replaced by….

function IXR_Message ($message) {
$this->message = preg_replace(‘/\\\\n+/’,”,$message);
}

This doesn’t seem like and ideal solution, but it does work (this post was written back in ScribeFire!)

Powered by ScribeFire.