When I add a YouTube video the file type is set to undefined.

I have the RC3 version of media_youtube, dev version of File Entity and dev version of Media.

video/youtube is in the Mimetype List of the Video file type.

Files: 
CommentFileSizeAuthor
#3 media_youtube_filetype_empty.patch585 bytesmaris.abols

Comments

ratface’s picture

I had the same error but I was using the following:

Media youtube: 2.0-rc3
Media: 2.0-unstable7
File entity 2.0-unstable7

I added 'video/youtube' to the Mimetypes field on the Video file type edit screen and the issue has been resolved.

steinmb’s picture

Did both of you upgrade from RC2?
Edit: and unstable 6?

maris.abols’s picture

StatusFileSize
new585 bytes

The same for me. I created small patch that solves the problem at least for me. It just add $file->type = 'video'; to object init function. I assume that media_youtube module always provide only video files. Situation is the same as in media_vimeo, I created issue here: https://drupal.org/node/2032803

nzcodarnoc’s picture

Confirming that patch in #3 resolved this issue for 7.x-2.0-rc3

steinmb’s picture

Version:7.x-2.0-rc3» 7.x-2.x-dev

This needs to be rolled against dev.

jhedstrom’s picture

Status:Active» Needs work

This patch did not resolve the issue for me. However, I was able to resolve the issue by editing the video file entity (admin/structure/file-types/manage/video/edit) and adding the mimetype video/youtube. This was only needed on the media browser dialogue--adding a file at http://rp.dev/file/add/web worked without that change to mimetypes...not sure why validators are behaving differently for the 2 methods.

CRY_X2’s picture

thanks, your solution is very helpfull!

lakshminp’s picture

Thanks. The patch in #3 works fine.

Devin Carlson’s picture

Status:Needs work» Fixed

This should now be fixed with #1911970: The audio, image, and video file types should default to a wildcard mimetype selector. I'm not able to duplicate this issue with the latest versions of Media, Media: Youtube and File entity.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

kenianbei’s picture

I had the same issue. I found comment #6 to be the most appropriate solution. Perhaps media_youtube needs to check that video/youtube is added to the video mimetypes?