ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Problem embedding YouTube video into blog post field - works for one site but not the other ?

June 27, 2007 11:29pm

Subscribe [2]
  • #1 / Jun 27, 2007 11:29pm

    Alexa

    2 posts

    When I put the embed code for a YouTube video in the body field to post, it returns this (from looking at the page source in the browser) and only shows the code in the post:

    <object width=“425” height=“350”></param></param><embed src=“http://www.youtube.com/v/IYRIBlSDu7U” type=“application/x-shockwave-flash” wmode=“transparent” width=“425” height=“350”></embed></object>

    <div class=“posted”>

    When I do this for my other site it works fine and this is what the page source view looks like:

    <object width=“425” height=“350”></param></param><embed src=“http://www.youtube.com/v/xmvxSlHuXn8” type=“application/x-shockwave-flash” wmode=“transparent” width=“425” height=“350”></embed></object>


    <div class=“posted”>

    Any ideas how to fix this?  Thanks all!

  • #2 / Jun 27, 2007 11:41pm

    Sue Crocker

    26054 posts

    Alexa, I just took the code you posted for the second page view source and used that in an entry. It worked for me.

    If you compare the two entry sources, are they identical?

    I used xhtml for my formatting

    <object width="425" height="350"></param></param><embed src="http://www.youtube.com/v/xmvxSlHuXn8" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>
    

    And this code. Does that work for you?

  • #3 / Jun 28, 2007 12:41am

    Alexa

    2 posts

    Hi Sue.  I’m not sure I understand the post.  The second page source view is what is generated automatically after submitting a post on stylefuture and it’s working fine.  The first set is from artfuture and is what is automatically generated.  They are both in Xhtml.  The interesting thing is I pasted in the code generated for artfuture (the one that isn’t working) and when I pasted it here in the forum, it converted some of the text.  Example:  in the page source view it shows:

    ampersandlt;object width=“425” etc.  instead of <object width=“425” etc.  It looks like many of the greater than or less than symbols enclosing some of the code are converting to gibberish.  This is happening automatically in the post - I haven’t changed anything. 

    Does this make more sense? 

    Thanks 😊

  • #4 / Jun 28, 2007 6:24am

    Sue Crocker

    26054 posts

    What are your settings for this particular weblog for Default HTML formatting in weblog entries]/b]? Mine is set to Allow ALL HTML.

    What is yours set to? Compare the two weblogs and this setting.

  • #5 / Jun 29, 2007 12:49am

    Alexa

    2 posts

    You rock Sue!  That’s exactly what it was.  Thanks so much for the help.  Now for the busy coding weekend 😊