I created a new custom post type based on the code provided by the wordpress codex. But when I try to set a featured image it returns and shows -1 in the featured image box instead of the images.
I checked in the function that sets the featured image and it looks like it doesn't pass the check to see if I'm allowed to edit the post ( current_user_can('edit_post', $postID) )
However when I check somewhere in my plugin (I'm adding meta boxes in that particular page) with the same function it shows that I have the right to edit the page.
Anyone an idea why it is causing a problem with the featured image?