[wp-trac] [WordPress Trac] #27090: WordPress XML-RPC method returns error but still posts

WordPress Trac noreply at wordpress.org
Tue Feb 11 15:11:53 UTC 2014


#27090: WordPress XML-RPC method returns error but still posts
--------------------------+------------------------------
 Reporter:  IndigoJo      |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  XML-RPC       |     Version:  3.8.1
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by redsweater):

 This doesn't seem too pursuable without a reproduceable test case. The
 claims suggest that an error can be propagated from _insert_post in class-
 wp-xmlrpc-server.php at some point after the wp_insert_post call:
 {{{
 $post_ID = $update ? wp_update_post( $post_data, true ) : wp_insert_post(
 $post_data, true );
 if ( is_wp_error( $post_ID ) )
         return new IXR_Error( 500, $post_ID->get_error_message() );

 if ( ! $post_ID )
         return new IXR_Error( 401, __( 'Sorry, your entry could not be
 posted. Something wrong happened.' ) );

 return strval( $post_ID );
 }}}

 But more suspicious in this case is that the reporter doesn't see an
 actual error response from their networking library. I would be inclined
 to think this issue has something to do with their networking library or
 with their network connection. The post being published is consistent with
 there not actually being any error propagated from WordPress, but their
 networking library instead interpreting something about the response as an
 error condition.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27090#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list