Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#21626 closed enhancement (invalid)

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

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


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)

#1 @arthurjarmstrong
8 years ago

  • Owner set to arthurjarmstrong
  • Status changed from new to reviewing

#2 @markoheijnen
8 years ago

  • 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.

#3 @arthurjarmstrong
8 years ago

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?

#4 @markoheijnen
8 years ago

Yes that should work like that

#5 @nacin
8 years ago

  • 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.