Forums

[resolved] XMLRPC editPage does not record slug passed in (3 posts)

  1. spaceboy
    Member
    Posted 4 years ago #

    Hi,

    I'm using WP 2.2.1, and am trying to edit a page using the XMLRPC interface. I can successfully change the title, description and author, but not the slug. In my case, the Slug defaults to the Page Title (separated by dashes).

    The data structure that I'm using to pass to the XMLRPC wp.editPage API is:

    $input = Array (
    new xmlrpcval($this->_blog_id, 'int'),
    new xmlrpcval($this->_page_id, 'int'),
    new xmlrpcval(WP_USERNAME, 'string'),
    new xmlrpcval(WP_PASSWORD, 'string'),
    new xmlrpcval(
    Array(
    'wp_slug' => new xmlrpcval($this->_slug, 'string'),
    'wp_page_parent_id' => new xmlrpcval($this->_page_parent_id, 'int'),
    'wp_author_id' => new xmlrpcval($this->_author_id, 'int'),
    'title' => new xmlrpcval($this->_title, 'string'),
    'description' => new xmlrpcval($this->_content, 'string'),
    'mt_allow_comments' => new xmlrpcval($this->_allow_comments, 'int'),
    'mt_allow_pings' => new xmlrpcval($this->_allow_pings, 'int')
    ),
    'struct'
    ),
    new xmlrpcval($this->_publish, 'boolean')
    );

    I've debugged the code to the point of tracing the editPage flow to wp_insert_post, and the $post_name is the same slug name passed in via the XMLRPC call.

    Could the slug name change down stream somehow?

    Note: I can add a new page (via XMLRPC) with the custom slug name successfully.

    Thanks,
    Rob.

  2. spaceboy
    Member
    Posted 4 years ago #

    FYI. I've submitted a ticket on this issue:

    http://trac.wordpress.org/ticket/4582

  3. spaceboy
    Member
    Posted 4 years ago #

    UPDATE: It works after disabling the Singular plugin. I can successfully edit the page (via XMLRPC), keeping the same custom slug name.

    There is more information at the semiologic forum thread:

    http://forum.semiologic.com/discussion/1098/issue-with-posting-comments-on-pages-after-426-pro-upgrade/#Item_0

Topic Closed

This topic has been closed to new replies.

About this Topic