WordPress.org

Forums

YouTube auto-embed not working (18 posts)

  1. cosmocanuck
    Member
    Posted 1 year ago #

    Hi all. I notice that WordPress's feature for auto-embedding YouTube videos is now broken. Normally, I just put a YT link in a line on its own, and the embed auto-magically shows up (using I believe the oEmbed system). But now, nothing but dead unlinked text.

    Kind of a problem, as all my site's video links are now broken.

    I'm running the latest WordPress, and also tried disabling all plugins and switching to the twentythirteen theme. No difference, sad to say.

    Anyone have an idea why this might be happening or what if anything I can do?

    Thanks...

  2. Hm, I'm not noticing that myself: http://macmanx.com/type/video/ those are all embedded just the same.

    Have you tried with all of your plugins temporarily disabled and the Twenty Fourteen (not Thirteen) theme?

    Also, can you give us a link to a post with the problem?

  3. cosmocanuck
    Member
    Posted 1 year ago #

    Thanks James. I set it to Twenty Fourteen and no plugins, but same situation. Here's a link:

    http://adamabrams.com/archives/7203

    And they're all like that - both Vimeo and YouTube links.

  4. Ok, let's focus specifically on that post.

    Try changing that line to:

    [embed]https://www.youtube.com/watch?v=KTJOz7Nz8m8[/embed]

  5. cosmocanuck
    Member
    Posted 1 year ago #

    Tried that, but it just makes the URL into a link.

  6. cosmocanuck
    Member
    Posted 1 year ago #

    Bewilderingly, a client of mine just now reported the same situation - an embedded YT vid was now just an unlinked URL. There, I tried adding the [embed] code - and it worked! But on my site... no luck.

  7. Hm, ok then, very strange indeed.

    Sorry to be a pest and ask again, but did you definitely disabled all plugins? I'd be rich by now if I had $5 for everyone whose definition of "all" was "all but the one causing the problem." :)

    Also, try updating the post with all plugins disabled, trying both:

    https://www.youtube.com/watch?v=KTJOz7Nz8m8

    and

    [embed]https://www.youtube.com/watch?v=KTJOz7Nz8m8[/embed]

    If it doesn't work again, try one more time, but use the Text editor tab, not the Visual tab.

    Also, make sure that you are just pasting these as-is on their own line, no additions like alignment and such.

  8. cosmocanuck
    Member
    Posted 1 year ago #

    Thanks James. Yep, I hear you about "all" plugins being off, but I was super-thorough and turned them ALL off even if it was going to play havoc with my site.

    So, I stayed in the text editor just to be safe, and pasted both the pure link, and the one wrapped in embed codes, into my post. Definitely in their own line. Updated and viewed, and both times get the same result: with just a link, I get dead text, and with embed codes, I get a link. But no actual embed.

    Sigh...

  9. cosmocanuck - I have to ask the obvious. Did you test with all plugins off, like the folder renamed off, and the default theme active?

    Other plugins and themes have been known to break embeds all the time. I try and catch any that submit to the .org repo, but ... people insist on reinventing the wheel the hard way.

  10. Ok, running out of ideas here, so let's try a few of the almost-nuclear options.

    Believe it or not, some plugins may remain active even though you deactivate them, kind of like "turning off" a modern TV, they're always on.

    For force them all to shut down, navigate to /wp-content/ via SFTP, FTP, or your hosting provider's file manager and rename the /plugins/ directory to /plugins-old/ then check your site.

    Did the embeds work? I hope so. If so, name it back to /plugins/ and start re-enabling each individually until you find the cause.

    If not, perhaps one of the core files was corrupted. Try downloading WordPress again and delete then replace your copies of everything except the wp-config.php file and the /wp-content/ directory with fresh copies from the download. This will effectively replace all of your core files without damaging your content and settings. Some uploaders tend to be unreliable when overwriting files, so don't forget to delete the original files before replacing them.

  11. Whoops, sorry to cross there Mika. That's what I get for re-writing this reply several times. :)

  12. cosmocanuck
    Member
    Posted 1 year ago #

    No worries asking the obvious, Mika, and I did indeed turn everything off... AND tried the renaming-the-plugins-folder trick too. No joy.

    I'll re-download WP using your suggested method, and let you know!

  13. cosmocanuck
    Member
    Posted 1 year ago #

    I'm sorry to say, that after moving all my stuff (minus plugins; twentythirteen theme selected) to a fresh WP install... I get the same result.

  14. Ok, running low on ideas, 2 left.

    1. Are you running any sort of web application firewall (Cloudflare, Sucuri, mod_security, something server-side, etc)? oEmbed reaches out to the URL in question and gets the embed code back from it. If oEmbed suddenly stopped, perhaps something suddenly began blocking that 2-way communication.

    2. Does a normal embed code from YouTube (their iframe embed) work?

  15. I did just think of a third idea/question.

    3. Are you running any caching, either via plugin or server-side?

  16. cosmocanuck
    Member
    Posted 1 year ago #

    Morning James. To answer your questions:

    1. No firewall that I'm aware of.
    2. Yes, a standard embed (which uses an iframe) does work.
    3. No caching that I'm aware of.

    I'll confirm whether anything related to 1 or 3 might have changed at my web host.

  17. Thanks!

    Also, you mentioned earlier that your friend is having the same problem.

    Is there anything you can think of that is similar between your configurations? Do you share the same theme, plugins, and/or hosting provider?

  18. randallking
    Member
    Posted 1 year ago #

    I was having the same problem starting today. All of my previous posts with YouTube links were showing the video, but my new link was just showing the address of the video in plain text.

    Here was the fix I used:

    I looked at a previous post that was working. Looking at the Text view (as opposed to the Visual view), I noticed that there were no HTML tags at all on the posts that work. On the new post today that wasn't working, it had paragraph (<p>) tags around the text. (I think this happened because I accidentally clicked on the right-align button, and then to fix it clicked on left-align. That evidently inserted some code, unbeknownst to me.) I removed all of the HTML code and put the YouTube link on its own line, just as I have been doing previously. VoilĂ !

Topic Closed

This topic has been closed to new replies.

About this Topic