Can`t embed (to body with wysiwyg) youtube video from media browser which launched from wysiwyg.

It simply returns this message http://youtu.be/shortpath could not be added. Only the following types of files are allowed to be uploaded: image, video

In file types for video file type "YouTube videos" is checked. And is seems that this is not related to this issue #1835826: Problem with "Verify HTML" Filter and WYSIWYG Media Integration.

Also I`m getting this error Notice: Undefined offset: 1 in eval() (line 3 of ~sites\all\modules\views\plugins\views_plugin_argument_default_php.inc(53) : eval()'d code). but I think that this is not related to the problem...

I`m using "Media 7.x-2.0-unstable7", "Wysiwyg 7.x-2.2" with TinyMCE 3.4.7

Also I`m using "Media WYSIWYG View Mode"

What am I doing wrong? Any ideas?
Thanks!

Comments

betoscopio’s picture

I'm having the same problem using Media 2.0-unstable7, Wysiwyg 2.2(with CK Editor) and Media: Youtube 2.0-rc1 and Media: Vimeo 2.x-dev. All this after an upgrade from Media 1.2.
When I try to insert a Vimeo video I have the exact same error that when I try with Youtube.

http://www.youtube.com/watch?v=* could not be added. Only the following types of files are allowed to be uploaded: audio, image, video
http://vimeo.com/* could not be added. Only the following types of files are allowed to be uploaded: audio, image, video

Because of this, I think it could be a Media module problem and not specific from Media: Youtube.

lanzs’s picture

I`ve been upgrading from media 1.2. too.
Yeap, seems that its a Media module problem.

RobW’s picture

Version: 7.x-2.0-rc1 » 7.x-2.x-dev
Status: Active » Closed (duplicate)

This is probably a dupe of #1812976: Register video/youtube mimetype and provide an upgrade path. Try going to file types, adding video://youtube to the allowed mimetypes, and checking the youtube file type checkbox, or, because no one should have to do that manually, installing the M:YT dev version and running update.php.

Please re-open if that doesn't solve the problem.

betoscopio’s picture

I went to admin/structure/file-types and youtube and vimeo wasn't checked. So I changed it.
After that, I tried to add video://youtube and video/youtube to allowed mimetypes and a got this message:

The mimetype video/youtube is not a valid mimetype.

After that, I updated to 2.x-dev and all worked fine.
For make vimeo work I had to manually add video/vimeo to mimetypes.

lanzs’s picture

Same thing, now everything works, thanks!

user654’s picture

.

betoscopio’s picture

@pinkonomy, wich path do you use to go to File Types?

pierremarcel’s picture

Here is the path and it's under "MIMETYPES" scroll all the way down and add " video/youtube" save and you should be good to go.

admin/structure/file-types/manage/video/edit

jagermonster’s picture

Thanks this worked for me, can this please be added to the .install file so that it sets this when the youtube module gets installed?