[wp-trac] [WordPress Trac] #22335: XML-RPC: attach_uploads does not set post_status 'inherit'
WordPress Trac
noreply at wordpress.org
Wed Oct 31 17:07:26 UTC 2012
#22335: XML-RPC: attach_uploads does not set post_status 'inherit'
-----------------------------+--------------------------
Reporter: DaEnno | Type: defect (bug)
Status: new | Priority: normal
Milestone: Awaiting Review | Component: XML-RPC
Version: | Severity: normal
Keywords: |
-----------------------------+--------------------------
To send a blogpost via XML-RPC interface I take the following steps:
1. Upload all images via ''wp.uploadFile''.
2. Receive the IDs and URLs of the uploaded images and insert image markup
into the blogpost.
3. Create the actual blogpost via ''wp.newPost''.
'''The Problem:''' the uploaded images will show up in the blogpost but
can't be found in the media library.
This seems to appear due to a bug in the function "attach_uploads" in the
file ''class-wp-xmlrpc-server.php''. The function sets the ''post_parent''
of all images to the ID of the actual blogpost. But it does '''not'''
update the image's "post_status" from "draft" to "inherit".
The images are included when displaying the image count in the media
library but they are not listed there.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22335>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list