Opened 12 years ago
Closed 12 years ago
#22204 closed defect (bug) (fixed)
XML-RPC _insert_post error when updating a post with a thumbnail.
Reported by: | picklepete | Owned by: | ryan |
---|---|---|---|
Milestone: | 3.5 | Priority: | normal |
Severity: | major | Version: | 3.4.2 |
Component: | XML-RPC | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
Versions affected: 3.4+
Summary: Updating a post with wp_editPost is throwing an "Invalid attachment ID" error due to a change to set_post_thumbnail in 3.4. In 3.3.3 and earlier "true" was always returned. Now, when the post_thumbnail is compared against the existing post_thumbnail the "false" which is returned bubbles up to set_post_thumbnail and an "Invalid attachment ID" is thrown.
The attached patch satisfies two needs:
- That the attachment's existence is tested, and if it's invalid, an "Invalid attachment ID" error is thrown.
- That it should be possible for set_post_thumbnail to execute and return false, which it will if the post thumbnail hasn't been changed.
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
How to replicate: