Title: Bug in XML-RPC interface?
Last modified: August 20, 2016

---

# Bug in XML-RPC interface?

 *  [DaEnno](https://wordpress.org/support/users/daenno/)
 * (@daenno)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/bug-in-xml-rpc-interface/)
 * Hey guys,
 * before reporting this as a bug I want to make sure it actually is one.
 * When uploading a post via XML-RPC I have to upload the images first. I do so 
   via `wp.uploadFile`.
    Later I update the actual blogpost via `wp.newPost`.
 * WordPress is smart enough to look through all images in the markup and sets the
   correct `post_parent` in the database. But it forgets to make the `post_status`
   _inherit_.
 * Getting more concrete, look in the file _wp-includes/class-wp-xmlrpc-server.php_
   and find the function `attach_uploads`. It sets the `post_parent` but doesn’t
   update the `post_status`.
 * Because WordPress forgets about this you won’t be able to find the uploaded images
   in your media library. The images do count in the image count shown at the top,
   but you won’t get to see them in the actual file list.
 * In my opinion this is a bug that can be easily fixed.
    What do you think?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [danielvg](https://wordpress.org/support/users/danielvg/)
 * (@danielvg)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/bug-in-xml-rpc-interface/#post-3106550)
 * I have similar problems with XMLRPC and wp.editPost. I am uploading an image 
   and changing some attributes (title, caption, …) with wp.editPost.
 * File wp-includes/class-wp-xmlrpc-server.php calls to function _insert_post() 
   to commit changes to the post representing the image. This function has a switch/
   case for the post_status parameter. This switch doesn’t have into account the‘
   inherit’ status, and it writes draft as a default status for the post. As a consequence
   of this the image is not shown in the media library.
 * Does Media Library show only ‘inherit’ elements? Why?
    Is a bug for XMLRPC server
   to avoid ‘inherit’ status when editing posts?
 *  Thread Starter [DaEnno](https://wordpress.org/support/users/daenno/)
 * (@daenno)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/bug-in-xml-rpc-interface/#post-3106566)
 * Well, I opened a [ticket](http://core.trac.wordpress.org/ticket/22335) so the
   problem got initially solved. Yay 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Bug in XML-RPC interface?’ is closed to new replies.

## Tags

 * [XML-RPC](https://wordpress.org/support/topic-tag/xml-rpc/)

 * In: [Requests and Feedback](https://wordpress.org/support/forum/requests-and-feedback/)
 * 2 replies
 * 2 participants
 * Last reply from: [DaEnno](https://wordpress.org/support/users/daenno/)
 * Last activity: [13 years, 7 months ago](https://wordpress.org/support/topic/bug-in-xml-rpc-interface/#post-3106566)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
