[wp-trac] [WordPress Trac] #14067: WP3.0 XMLRPC wp.newCategory fails for existing category
WordPress Trac
wp-trac at lists.automattic.com
Wed Jun 23 23:32:54 UTC 2010
#14067: WP3.0 XMLRPC wp.newCategory fails for existing category
---------------------------+------------------------------------------------
Reporter: andrewpeacock | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Unassigned
Component: XML-RPC | Version: 3.0
Severity: critical | Keywords: xmlrpc
---------------------------+------------------------------------------------
Hi,
I'm comparing 2.9.2 and 3.0 with the same remote client calling WP's
XMLRPC, as follows:
<?php
require("class.xmlrpc.php");
$client = new IXR_Client("URL");
$client->debug = true;
$content = Array();
$content["name"] = "1-800-PetMeds";
if (!$client->query('wp.newCategory', "", "USERNAME", "PASSWORD",
$content)) {
die('Something went wrong - '.$client->getErrorCode().' :
'.$client->getErrorMessage());
} else {
$categoryID = $client->getResponse();
}
?>
On 2.9.2:
- If the category name is not in use, the category is created and the new
ID returned.
- If the category name is in use, the existing ID is returned.
On 3.0:
- If the category name is not in use, the category is created and the new
ID returned.
- If the category name is in use, a generic XMLRPC is returne:
<?xml version="1.0"?>
<methodResponse>
<fault>
<value>
<struct>
<member>
<name>faultCode</name>
<value><int>500</int></value>
</member>
<member>
<name>faultString</name>
<value><string>Sorry, the new category failed.</string></value>
</member>
</struct>
</value>
</fault>
</methodResponse>
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14067>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list