[wp-trac] [WordPress Trac] #11430: metaWeblog.newPost no categories saved if one is not recognised
WordPress Trac
wp-trac at lists.automattic.com
Mon Dec 14 15:43:14 UTC 2009
#11430: metaWeblog.newPost no categories saved if one is not recognised
--------------------------+-------------------------------------------------
Reporter: Fubra | Owner: josephscott
Type: defect (bug) | Status: new
Priority: normal | Milestone: Unassigned
Component: XML-RPC | Version: 2.9
Severity: normal | Keywords:
--------------------------+-------------------------------------------------
There appears to be a bug in the metaWeblog.newPost functionality of the
XML-RPC which causes categories not to be assigned correctly to the new
post if one or more of the supplied categories does not exist on the
target blog.
For example; the blog has the category 'Cat 1', and the post is submitted
with two categories 'Cat 1' and 'Cat 2'. This causes the post to be
assigned to no categories at all.
This is not the expected behaviour according to the metaWeblog API RFC
(http://www.xmlrpc.com/metaWeblogApi): "On the server side, it's not an
error if the category doesn't exist, only record categories for ones that
do exist."
A fix would be to check the return value of get_cat_ID() (around line 2216
of xmlrpc.php) and only include it in the $post_categories array if the
return value is > 0.
This bug was found in 2.8.6 and exists in the currently available version
of 2.9.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11430>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list