Opened 13 years ago
Closed 13 years ago
#22672 closed defect (bug) (fixed)
Edit Media Page: Title Field Has No Value
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 3.5 | Priority: | normal |
| Severity: | normal | Version: | 3.5 |
| Component: | Media | Keywords: | |
| Focuses: | Cc: |
Description
Although the images in the Media Library all have titles, after clicking the Edit link, the Edit Media page is always displayed with a blank title field at the top. The HTML contains a null string for the value attribute.
<input type="text" name="post_title" size="30" value="" id="title" autocomplete="off" />
Found in 3.5-RC2-22958.
Attachments (2)
Change History (7)
#3
@
13 years ago
- Keywords has-patch removed
- Milestone changed from Awaiting Review to 3.5
I think the changes from $post->post_status to get_post_status() may simply have been in error in [21948].
I had made an adjustment in ticket:21391:attachment-show-ui.diff moving to get_post_status(), and it may have needed to get propagated elsewhere, but definitely not for these auto-draft checks.
Note: See
TracTickets for help on using
tickets.
The fix is actually simple. Because 3.5 is using post.php to edit attachments now, it runs into the same code that was handling "Auto Draft" posts, which can be found in the Media Library for images uploaded to posts that weren't saved. It's possible to edit that post, so there's a line of code that says to blank out the "Auto Draft" value of the title when editing that post.
My patch checks to make sure the "post" object being edited is not an attachment. There are many other possible solutions, as there are many ways to distinguish auto-draft posts and the attachments thereof.
see miqro-22672.patch