If you’re using Ecto to create and edit posts, there is an error in the “xmlrpc.php” file on WordPress 2.1 that causes Ecto to hang up when refreshing. Ecto will hang at the point of collecting post categories.¬† This error is a prior issue that did not get merged into WP 2.1.

The correct code for the get post categories function in xmlrpc.php is notated below. Please add the (string) parameter that is marked in red text to correct this error. You may also review the issue ticket at WordPress support for more information.

WordPress 2.1 xmlrpc.php file source:

function mt_getPostCategories($args) {

$this->escape($args);

$post_ID    = $args;
$user_login  = $args;
$user_pass  = $args;

if (!$this->login_pass_ok($user_login, $user_pass)) {
return $this->error;
}

$categories = array();
$catids = wp_get_post_categories(intval($post_ID));
// first listed category will be the primary category
$isPrimary = true;
foreach($catids as $catid) {
$categories[] = array(
‘categoryName’ => get_cat_name($catid),
‘categoryId’ => (string) $catid,
‘isPrimary’ => $isPrimary
);
$isPrimary = false;
}

return $categories;
}

Technorati Tags: ecto, error, wordpress, xmlrpc.php

4 Comments

  1. Thanks for this just edited xmlrpc file, ecto working great now!