YouTube Embed
[resolved] double dashes in YT ID and escaping quotes (6 posts)

  1. kchayka
    Posted 3 years ago #

    Running YTE 2.5.6 on the latest WP and mostly default options. A couple small things came up I wanted to share.

    One of the YT videos has double dashes in the ID: yIW--5LiN0k
    If I copy/paste the entire "Share" link in the shortcode an error occurs. The page source shows:

    !-- YouTube Embed v2.5.6 | http://www.artiss.co.uk/artiss-youtube-embed -->
    <!-- The YouTube ID of yIW is invalid. -->
    <p>The video cannot be shown at the moment. Please try again later.</p>
    <!-- End of YouTube Embed code -->

    If I remove the link from the shortcode and just use the ID the video thumb displays fine. While it's more convenient to just copy/paste the entire "Share" link, trimming this down to just ID is an easy work-around.

    The second thing was trying to style that particular error message so it would take up the same space of the default video thumb size and not mess up the layout. I tried to add a class selector in the Error Reporting Options, e.g. <p class="error"> but after Save Settings I see backslashes on the quotes, which causes the code to be invalid and any CSS ignored.

    I tried doing the above on a different WP site with a different template and got the same results so they seem to be core plugin issues. Not major, but should not occur. Otherwise, an excellent plugin.


  2. ArtissTheGeek
    Posted 3 years ago #

    Thanks for the kind words.

    I'll look into both those issues you've mentioned and get them fixed in the next release.


  3. christopherw
    Posted 3 years ago #

    Hi there,

    Using the latest build (as of 26/09/2012) of your rather good plugin on a site I admin.

    I've noticed if the URL has a referring field, the plugin balks.

    Here's a valid YT URL:

    However the page embed code reads

    <!-- The YouTube ID of ature=player_embedded is invalid. -->

    As in other cases, manually editing the URL to remove feature=player_embedded solves the problem. As is usually the case though, other people who want to update the site and include YouTube URLs have zero technical knowledge so they would just see the error message and not understand why. (Then they'd email me! ;-)

    How does the plugin currently look for the variable, does it regex for the "v=" variable then look for the next ampersand (or closing inverted comma) to end the pattern match?

  4. ArtissTheGeek
    Posted 3 years ago #

    Thanks for letting me know. I'll look into resolving that for the next release.


  5. ArtissTheGeek
    Posted 3 years ago #

    These are fixed in 2.6

  6. christopherw
    Posted 3 years ago #

    Brilliant David, updating my install now. Kudos for fixing them so quickly, we're using your plugin on http://revolver.coop :-)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • YouTube Embed
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.