Drupal 7 Youtube videos as fields in content type

I have been doing quite a lot of work with Drupal 7 the last couple of months. It has its ups and downs but one thing that it always tries to do is to prevent you from having to write your own code to solve problems.
It gets quite annoying then when simple things don’t work. In my case I wanted a content type with nothing but a title and a video field that shows Youtube videos that the editor pasted the URL to. That should work, right?

Well, yes, it should, but not without problems. First, I installed the Media module and then the Media:Youtube module. I set up a content type with a field of the type Multimedia Asset.

Then comes the kicker: without doing the following things didn’t work. The videos didn’t show up at all. It took me quite some time to figure this out.

At the Manage Display tab I had to first remove the video (make it Hidden) and then add it again so that I could choose a file view mode. See screenshot below.

The display types are defined in Config > File Types > Manage file display. Here I can choose Youtube video and after making sure the content type chooses a file view mode the video was displayed. *phew!*

This entry was posted in Software. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

12 Comments

  1. Kyle Copley
    Posted September 27, 2011 at 3:41 pm | Permalink

    thanks for the help! I had the same problem.

    Do you know if you can change the image-style or preview size? I need to change that then view the video in a colorbox

  2. Ruben
    Posted November 15, 2011 at 4:47 pm | Permalink

    Thanks!

  3. Tran Minh Phúc
    Posted November 21, 2011 at 8:01 am | Permalink

    Thank you so much !!

  4. Giorgio
    Posted December 7, 2011 at 7:11 am | Permalink

    Thanks a lot for your help!

  5. Ayhan Binici
    Posted January 22, 2012 at 10:34 pm | Permalink

    Saved my day :)

  6. Momchil Brashnyanov
    Posted February 9, 2012 at 10:45 am | Permalink

    Thank you!

  7. Marco Perrando
    Posted February 23, 2012 at 10:19 am | Permalink

    Thanks! I was wasting so much time after this…

  8. Jamie Shek
    Posted May 8, 2012 at 9:35 am | Permalink

    I’m having issues with html validation. Are there any solutions for this?

  9. Joyce
    Posted May 11, 2012 at 7:54 pm | Permalink

    Thank you so much!

  10. Slav
    Posted May 19, 2012 at 8:33 am | Permalink

    Thank a lot for this post. Help me a lot :) .

  11. Andrew
    Posted November 20, 2012 at 9:37 am | Permalink

    As the “Multimedia Asset” now is deprecated, you can also use “File”, and else follow the above instructions. The key is the “File View Mode = Large”, which can also be set choosing e.g. “Rendered File” as “Format”. This works for me, and makes my site more future-safe.
    /Andrew

  12. anusanker
    Posted December 31, 2012 at 10:22 am | Permalink

    Thanks a lot for this post…

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>