﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
14067,WP3.0 XMLRPC wp.newCategory fails for existing category,andrewpeacock,,"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>
",defect (bug),closed,normal,3.0.1,XML-RPC,3.0,major,fixed,xmlrpc has-patch needs-testing,
