Opened 9 months ago

Closed 9 months ago

#21626 closed enhancement (invalid)

XML-RPC wp.newPost doesnt use the blog id parameter

Reported by: arthurjarmstrong Owned by: arthurjarmstrong
Priority: normal Milestone:
Component: XML-RPC Version:
Severity: normal Keywords:
Cc:

Description

When calling a new query with the wp.newPost via the XML-RPC and passing a blog ID parameter it will insert the post but on the main site, not on the blog in which the blog ID was passed. After looking at the code in the "wp-includes>class-wp-xmlrpc-server.php" under the function wp_newPost( $args ) it calls the _insert_post( $user, $content_struct ) function which does not take in the blog ID or switch the blog to the one that is passed.

Change History (5)

  • Owner set to arthurjarmstrong
  • Status changed from new to reviewing
  • Type changed from defect (bug) to enhancement

Well this isn't a bug. All the XML-RPC methods don't use the blog id yet. The way of doing it now is to use the XML-RPC url of the blog.

Alright, so when using a sub-directory such as "test" you would create a client based on the new URL like:

new IXR_Client('http://website.com/test/xmlrpc.php')

where http://website.com is the main location of the WPMU installation and "test" is the sub-directory installation?

Yes that should work like that

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from reviewing to closed

At this point I doubt we will ever use the blog ID parameter, as switch_to_blog() can't do things like switch plugins or the initial load.

Note: See TracTickets for help on using tickets.