XML-RPC: wp.editPost changes post_status from 'inherit' to 'draft'
|Reported by:||DaEnno||Owned by:||ryan|
To send a blogpost via XML-RPC interface I take the following steps:
- Upload all images via wp.uploadFile.
- Receive the IDs and URLs of the uploaded images and insert image markup into the blogpost.
- 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.
Change History (13)
4 years ago
- Milestone changed from Awaiting Review to 3.5
- Type changed from defect (bug) to enhancement
- Version set to 3.4
4 years ago
- Summary changed from XML-RPC: attach_uploads does not set post_status 'inherit' to XML-RPC: wp.editPost changes post_status from 'inherit' to 'draft'