Support » Alpha/Beta/RC » Bug: WP 2.7 RC2. XMLRPC – getCategories

  • Resolved UseShots

    (@useshots)


    Found a bug introduced in RC2.

    XMLRPC function “metaWeblog.getCategories” wouldn’t work if any of the categories doesn’t have a description. Error ” -2: Key [description] not found” is returned.

    If I assign descriptions to all categories the function work. If I remove even one category’s description, the function returns error.

    Very nasty bug since the default “Uncategorized” category usually doesn’t have any description.

    This bug will prevent offline blog clients from being able to load categories from server (this function is used almost every time to synchronize a client with the server)

    Here is the change in the code:
    xmlrpc.php: function mw_getCategories($args)
    ——-
    was (RC1):
    $struct[‘parentId’] = $cat->parent;
    $struct[‘description’] = $cat->name;
    ——-
    now (RC2):
    $struct[‘parentId’] = $cat->parent;
    $struct[‘description’] = $cat->description;
    ——-
    No check whether $cat->description exists.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The same in the final release 2.7

    I have not be able to reproduce this error. Are you using a specific client that is having a problem?

    Testing against 2.7 I make a call metaWeblog.getCategories call and get the default “Uncategorized” category back just fine:

    {
            categoryId = 1;
            categoryName = Uncategorized;
            description = "";
            htmlUrl = "http://localhost/~joseph/wp/trunk/?cat=1";
            parentId = 0;
            rssUrl = "http://localhost/~joseph/wp/trunk?feed=rss2&cat=1";
    }

    Checked with another XMLRPC client and it worked. Must be a bug in the client.

    My appologies for the false alert. I should have tested the issue more thoroughly.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Bug: WP 2.7 RC2. XMLRPC – getCategories’ is closed to new replies.