Opened 14 years ago
Closed 14 years ago
#13033 closed defect (bug) (fixed)
"Use as featured image" not showing after deleting featured image
Reported by: | alexmglover | Owned by: | |
---|---|---|---|
Milestone: | 3.0 | Priority: | high |
Severity: | normal | Version: | 3.0 |
Component: | Media | Keywords: | has-patch |
Focuses: | Cc: |
Description
If a featured image is deleted, and then "Set Featured Image" is clicked, "Use as featured image" option is not available. In order for "Use as featured image" to show up, "Update" needs to be clicked to save the post/page without a Featured Image, then upon clicking "Set Featured Image" the option becomes available. I am not sure if this is intended behavior, but it seemed like a bug to me.
Attachments (2)
Change History (4)
#1
@
14 years ago
- Keywords has-patch added
- Milestone changed from Unassigned to 3.0
- Priority changed from normal to high
I could trace the problem to admin-ajax.php
. The function that creates the link for the upload has a global $post_ID
. However, the set-post-thumbnail
case have a $post_id
(yes, 2 different variable names).
As a first attempt to fix it, just adding $post_ID = $post_id;
below line 1465 fixes the bug. Another option (way more cool) is changing the variable name in set-post-thumbnail
; but there's no clue if this bug could flip (ie. : another function has global $post_id
)
'Cause post_id != post_ID