Opened 12 years ago
Closed 12 years ago
#17784 closed defect (bug) (duplicate)
media items uploaded through post-thumbnails require the post to have editor support
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.1.3 |
Component: | Media | Keywords: | |
Focuses: | Cc: |
Description
When uploading a media item via add featured image (post-thumbnails) on a custom post type that does not support an editor prevents that media item from being inserted into other posts (as the insert into post button is not present) on other post types that do support and editor.
The issue is with media.php line 1289 if ($send)
$send is set to false on these media items.
Media items uploaded to the media library should not be associated with a post-type if they are also going to be available elsewhere or the default $args for send should not be checking for editor support media.php line 1187 (function get_media_item)
Attachments (1)
Change History (8)
#3
@
12 years ago
- Keywords has-patch added
More usable test code:
add_action( 'init', 'foo_bar' ); function foo_bar() { register_post_type('FOO',array('public' => true, 'supports' => array('title', 'thumbnail'))); register_post_type('BAR',array('public' => true, 'supports' => array('title', 'editor'))); }
Following patch moves some existing code for the post thumbnail support check further up and uses the calling post's ID where possible, rather than the post parent.
Also changes isset( $_POST ) && count( $_POST )
to !empty( $_POST )
#4
@
12 years ago
Can even just be if ( $_POST ).
I'm positive there's a duplicate ticket of this somewhere. No doubt seen this reported before.
1.add a featured image to FOO (upload a new image)
2.add New BAR