[wp-trac] [WordPress Trac] #4582: XMLRPC editPage does not record custom slug

WordPress Trac wp-trac at lists.automattic.com
Tue Jul 3 19:16:43 GMT 2007


#4582: XMLRPC editPage does not record custom slug
----------------------+-----------------------------------------------------
 Reporter:  spaceboy  |       Owner:  anonymous
     Type:  defect    |      Status:  new      
 Priority:  high      |   Milestone:  2.2.2    
Component:  XML-RPC   |     Version:  2.2.1    
 Severity:  critical  |    Keywords:           
----------------------+-----------------------------------------------------
 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() function, 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.

 Also, this could be related to another defect (not sure if a ticket exists
 or not) where approving/disapproving post comments changes the slug to the
 post title name (i.e. post name with dashes). This is the same behavior as
 the editPage XMLRPC command.

 Thanks,
 Rob.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/4582>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list