WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] YouTube embed not working in 3.1 (52 posts)

  1. MovieMemories
    Member
    Posted 3 years ago #

    Upgraded today to 3.1 and when adding a YouTube embed code the video does not show.

    Prior to upgrading, I have added 100's of embed codes to the same blog without a problem.

    Can you help?

  2. zasmagazine
    Member
    Posted 3 years ago #

    same here.. can't see any youtube or other embed objects in my editor :/

  3. Samuel Wood (Otto)
    Tech Ninja
    Posted 3 years ago #

    Why are you trying to add their embed code? WordPress has supported built in embeds since version 2.9.

    http://codex.wordpress.org/Embeds

    Just do this in a post:

    [embed]http://www.youtube.com/watch?v=dQw4w9WgXcQ[/embed]

    Simple.

  4. MovieMemories
    Member
    Posted 3 years ago #

    I use the old embed code because I customize both the size and color of the player to match the blog colors.

  5. zasmagazine
    Member
    Posted 3 years ago #

    nice one thanks otto!
    but I always change the size, like pictures...

  6. Samuel Wood (Otto)
    Tech Ninja
    Posted 3 years ago #

    You can change the size. Read closer:
    http://codex.wordpress.org/Embeds

    You cannot change the color, admittedly.

    If you really want to use YouTube's embed code and modify it and such, then switch to HTML mode to put in the code. The Visual Editor never has accepted HTML code in the Visual mode.

  7. zasmagazine
    Member
    Posted 3 years ago #

    videos or other objects looked like this, before the update
    but thanks for your effort, though.

  8. MovieMemories
    Member
    Posted 3 years ago #

    Thanks for the link Otto.

    I have always used the HTML mode to insert the YouTube embed code and have been aware of the WP support for adding videos.

    However, what I don't understand is why the option to use the YouTube embed code has disappeared with the upgrade. As I mentioned, I have done this hundreds of times without problem.

    This morning I added a post without problem before upgrading; then upgraded ten minutes later and now the embed code will not work in the HTML mode. A blank block shows where the video should be with the dreaded red x in the upper left hand corner.

    I checked my code because I do modify it to match my desired size and color. I tested the code off site and everything worked fine. Add the code to the site and it does not work.

    I'm thinking there was possibly an upgrade error although the upgrade stated that it went well. If it was an upgrade error, I would like to know how to get back to 3.0.5, or how to try and upgrade again.

    I have over 200 videos on the site - all the same size and perfectly matching the sites colors. I would like to keep it this way.

  9. zasmagazine - That looks like a flash problem, actually...

    MovieMemories - in HTML mode, you won't see any blank boxes (unless you mean on post-preview).

    I just tossed the YouTube embed code into a post and it worked fine. Ditto a CNN video. Is that particular video embedable?

  10. zasmagazine
    Member
    Posted 3 years ago #

    whatever :) I have to accept it the way it is =) thanks

  11. MovieMemories
    Member
    Posted 3 years ago #

    Thanks for the reply Ipstenu

    Yes, the box shows in the post-preview and the Visual Editor and the video was embedable. I had tried it off site and it worked fine.

    I don't know what the problem is, but I have been able to get around it using the Smart YouTube plugin. It allowed me to also match the color I wanted.

    Looks like I will stick with using the plugin and continue to try to figure out what happened.

    I thank you all for your efforts to help and if anyone can suggest what may have happened, please do.

  12. You're not switching back and forth between HTML and visual are you? Cause that way lies madness.

  13. jaswindervirdee
    Member
    Posted 3 years ago #

    Just to reiterate and clarify the problem.
    Previously when entering the the embed code into the html tab
    and switching back to the visual tab we would have seen this
    so we could use our cursor on the red outline to reshape it to the dimensions of our whim.
    but now when switching to the visual tab we see the actual youtube video embedded with no way of altering its dimensions

    and yeah switching back and forth between html and visual tab does make us go a little mad well me atleast!

  14. pinboardblog
    Member
    Posted 3 years ago #

    i have been using wordpress for over 3 years now, cannot understand why in heavens name they would take out this feature?

    my site depends heavily on flash media, and so we need to be able to edit the size (and colour) of the media we input. How does it make any type of sense to take this feature out?

    Biggest mistake i made was upgrading.

    I enter hmtl code in to the 'html' tab. When I switch back to 'visual' - nothing appears. I post or preview the post and the video appears (wrong size as I'm no longer able to edit it in the visual tab').

    A disgrace.

  15. Everyone - DO NOT switch between visual and HTML. It has always been buggy.

    This has ALWAYS been buggy, never recommended, and always a pain. Just stick to one.

  16. GlenT
    Member
    Posted 3 years ago #

    The video embedding function has 'not been finished' for 3.1. I have successfully reverted to 3.0.5 by following this procedure:

    get the previous version you were running, then unzip it ... copy everything but the wp-content folder to where ever your WP folder/files are ... and when you go to open your site-admin it may tell you it needs to do a database update click ok to that and bam every thing is back up and running.

    Video embedding is back and I have been through my site quite thoroughly, and have no residual problems.

    And I'll wait for v3.1.5.

  17. WARNING.

    The DATABASE was upgraded in 3.1 so UNLESS you have a backup of your database, the downgrade has a VERY high risk of jacking your site up.

    I wouldn't do it, and I'm a pretty experienced WP user.

  18. sfarson
    Member
    Posted 3 years ago #

    Please bring back the ability to embed a WMV video from a non video site server! The icon to enable this was unbelievably yanked out of 3.1!!!Many of us do not use the public video hosting sites with their contraints, video quality degradation, embedded advertising and such.

    I'm stunned by this. And stuck with a huge and growing site with videos from my own server... not YouTube, Vimeo, etc.

  19. blkcatgal
    Member
    Posted 3 years ago #

    When is the video embedding feature going to be fixed in 3.1? I cannot embed a youtube video into my blog since upgrading to 3.1.

  20. esmi
    Forum Moderator
    Posted 3 years ago #

  21. blkcatgal
    Member
    Posted 3 years ago #

    @esmi...as best as I can tell, that link does not provide any info as to how to embed in 3.1.

  22. esmi
    Forum Moderator
    Posted 3 years ago #

    The method hasn't changed. It's still exactly the same in 3.1.

  23. blkcatgal
    Member
    Posted 3 years ago #

    Well, I tried copying the url into my post and it worked the first time when I previewed it, but didn't work when I tried previewing it again.

    Before upgrading to 3.1 I always used the youtube embed code and it would work. I tried that, and it didn't work this time. Based on other comments and question others have posted, apparently there is an issue with embedding youtube videos into 3.1.

  24. zerocrew
    Member
    Posted 3 years ago #

    I to am having this issue. Yesterday i saw that WP upgraded the youtube video embedding to only having to post a link is your VISUAL editor.... a link like this one,
    http://locallilly.com/?p=3249&preview=true
    when i previewed my post yesterday it worked fine but today this is now not working.
    i've tried using the embed code as it states like this,
    [youtube=http://locallilly.com/?p=3249&preview=true]
    that got me know where... i would REALLY like to get this problem resolved because my site depends highly on video as well and now none of them are working.

    I'm not so worried about the editing of sizes and such but just for the video's to show up would be nice :)
    anyone? anyone? Bueller? hahaa :)

  25. Biranit
    Member
    Posted 3 years ago #

    It appears that something in 3.1 is broken as far as the auto-embed goes. As others mentioned, placing a link to a YouTube or Vimeo video in a new line, will initially show the embedded video, but will then stop showing up again.

    Very problematic. I'm anxious to find a solution.

    Thanks,

    Bira

  26. Biranit
    Member
    Posted 3 years ago #

    Just to add another point: the problem appears to be in the oembed caching in the postmeta db table. It stores {{unknown}} as the meta_value.

    I looked in media.php and compared it to previous versions. It appears the only or primary change was adding $post_ID to this:

    return apply_filters( 'embed_oembed_html', $cache, $url, $attr, $post_ID );
    return apply_filters( 'embed_oembed_html', $html, $url, $attr, $post_ID );

    Not sure if it's related in any way, but it is definitely an issue with the postmeta cache value. If I delete the *_oembed_* entry from the wp_postmeta table for a post, then the video shows up again.

    For now, I did a very dirty fix of adding an sql delete query to the top of my single.php file... Far from pretty or ideal... but at least the videos work again.

  27. deez
    Member
    Posted 3 years ago #

    I am having a similar problem I can embed the video into a page, but when I embed the video into a post it does not appear. anyone have the same problem or a workaround?

  28. deez
    Member
    Posted 3 years ago #

    Ok my problem turned out to be that the theme was only using excerpt in the index and archive php.

    Embed is working fine for me in 3.1

  29. whealie
    Member
    Posted 3 years ago #

    Cannot embed a video on three sites with different hosts.

    I have tried just pasting in the YouTube URL. I have tried adding a video. I have tried adding [embed] code and [youtube] code. And I have tried adding the embed code from YouTube in the html (both new and old)

    Nothing works.

  30. deez
    Member
    Posted 3 years ago #

    It may be a problem with the theme. I have found certain features don't work in some themes perhaps haven;'t been updated to work with fully with 3.1

    try another theme?

Topic Closed

This topic has been closed to new replies.

About this Topic