Make WordPress Core

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#12792 closed defect (bug) (fixed)

Custom post types cannot upload media or set thumbnails unless "editor" is enabled

Reported by: markjaquith's profile markjaquith Owned by:
Milestone: 3.0 Priority: normal
Severity: normal Version: 3.0
Component: Posts, Post Types Keywords: has-patch thumbnails
Focuses: Cc:

Description

Expected: setting "thumbnail" for custom post type allows for setting of thumbnail:

Observed: Unless "editor" is set, thumbnails won't work.

More:

In order to upload media or set thumbnails, the "editor" post type capability needs to be set. This isn't always desirable.

We should show the buttons if "thumbnail" is set but "editor" is not. Perhaps in its own "Media Upload" meta box.

Attachments (3)

12792.diff (6.1 KB) - added by scribu 15 years ago.
12792.2.diff (826 bytes) - added by scribu 15 years ago.
Restore thickbox title for featured images
12792.3.diff (4.0 KB) - added by scribu 15 years ago.
Conditionally display "Insert into Post" button

Download all attachments as: .zip

Change History (14)

#1 @scribu
15 years ago

Related: #12590

#2 @scribu
15 years ago

We should show the buttons if "thumbnail" is set but "editor" is not. Perhaps in its own "Media Upload" meta box.

I disagree. If you want to upload media, go to the Media screen.

To fix the thumbnail problem, we should replace jQuery('#add_image').click(); with something less presumptive.

#3 @scribu
15 years ago

  • Keywords has-patch added; custom post types removed

@scribu
15 years ago

#4 @markjaquith
15 years ago

To fix the thumbnail problem, we should replace jQuery('#add_image').click(); with something less presumptive.

attachment 12792.diff added

Nicely done! Solves that issues very cleanly.

#5 @markjaquith
15 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [14015]) Make thumbnail work for custom post types even if the editor is not being displayed. props scribu. fixes #12792

#6 @markjaquith
15 years ago

(In [14030]) TB_iframe fixes for stuff that broke in r14015. props scribu. fixes #12878. see #12792

@scribu
15 years ago

Restore thickbox title for featured images

#7 @scribu
15 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

When clicking "Set featured image", the thickbox title is blank. This is fixed in 12792.2.diff.

When the editor isn't displayed, we should also remove the "Insert into Post" button.

@scribu
15 years ago

Conditionally display "Insert into Post" button

#8 @nacin
15 years ago

(In [14118]) More tweaks for thumbnail support when no editor support for custom post types. see #12792, props scribu.

#9 @nacin
15 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

This seems good for me. Re-open if it not, or open a new ticket.

#10 @dd32
15 years ago

$_GETpost_id? is not always present, specifically, on the 2nd load of a async upload, only fetch & attachment_id are passed.

#11 @automattor
15 years ago

(In [14146]) Use the correct field when determining if the parent can support the Post Editor. See #12792

Note: See TracTickets for help on using tickets.