[wp-trac] [WordPress Trac] #28219: add_media 'Uploaded to this post' listing unattached files when post type does not support 'thumbnail'

WordPress Trac noreply at wordpress.org
Mon May 12 13:28:49 UTC 2014


#28219: add_media 'Uploaded to this post' listing unattached files when post type
does not support 'thumbnail'
----------------------------+-----------------------------
 Reporter:  bobbingwide     |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Media           |    Version:  3.9
 Severity:  normal          |   Keywords:
  Focuses:  administration  |
----------------------------+-----------------------------
 If you have a post type which does not support 'thumbnail' then I have
 noticed that using Add Media and selecting "Uploaded to this post" you get
 shown a list of media files which are NOT attached to the post.

 Note: This problem was first noticed with WordPress 3.9 and originally
 attributed to an '''unknown''' problem with Easy Digital Downloads.

 I was able to overcome the problem by adding post type support 'thumbnail'
 to the custom post types which exhibited the problem.

 I was also able to demonstrate the problem with the 'post' post type by
 adding a trivial plugin which removed thumbnail support.

 {{{
 add_action( "init", "rfi" );
 function rfi() {
   remove_post_type_support( 'post', 'thumbnail' );
 }
 }}}

 On the demonstration site the problem occurred when EDD was active. and
 didn't when it wasn't.

 Having upgraded to WordPress 3.9.1, a different site started exhibiting
 this problem; even when EDD is not activated. It now appears that
 WordPress SEO is the plugin that's causing the problem.

 Note: I have not yet determined the true cause of the problem.
 The workaround ( to include 'thumbnail' support) is still effective.

 With regards to related defects, you should also be aware of the scenario.
 I used shortcodes to display attachments. When I upload the file using Add
 Media I expect it to be automatically attached. The attachments are not
 expected to be inserted into the post.

 #8490 - I agree with westi and azaozz

--
Ticket URL: <https://core.trac.wordpress.org/ticket/28219>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list