WordPress.org

Ready to get started?Download WordPress

Forums

YouTube Embed
[resolved] I can't see any video (16 posts)

  1. stavroschri
    Member
    Posted 2 years ago #

    Hello,
    I created a new post and after my article I added the following link:

    [youtube]http://www.youtube.com/watch?feature=player_embedded&v=eYyZbawMyYM[/youtube]

    When I published the article and visited my site, never happened.
    I could see my article but I couldn't see the video or the link.

    Check it here.

    http://wordpress.org/extend/plugins/youtube-embed/

  2. wp_follower
    Member
    Posted 2 years ago #

    I too cannot see any video embedded in my post. I cannot show you an example as the site is new and is local on my computer. But here all the info that I can provide you:

    1- The WP version is 3.4.2
    2- Your latest plugin ver. 2.6.2 was installed, and activated
    3- There is no other video plugin installed (such as jetpack?)
    4- Tried both on Firefox and Safari to no avail
    5- All the followings were tried again to no avail
    (that is upon publishing the post, no video appears
    when you try to view it):
    [youtube]ID[/youtube]
    [youtube_video]ID[/youtube_video]
    [youtube]URL[/youtube]
    [youtube_video]URL[/youtube_video]
    6- I am using the default options/profile
    7- I even tried "API should not be used" under YouTube API and
    no effect
    8- Upon inspecting the source page, I can see the followings
    reference in the page:
    <link rel='stylesheet' id='aye_dynamic-css' href='http://localhost:8888/farbarg/wp-content/plugins/youtube-embed/css/aye-main.min.css?ver=3.4.2' type='text/css' media='all' />
    9- I also tried the following experiment. In the post I have the followings:

    http://www.youtube.com/watch?v=XLgYAHHkPFs
    [youtube]http://youtu.be/XLgYAHHkPFs[/youtube]

    Now the post, naturally shows the embedded video due to the first line but not because of the second line. Note that page source has it:
    <section class="entry-content">
    <p dir="ltr" ><iframe width="453" height="340" src="http://www.youtube.com/embed/XLgYAHHkPFs?fs=1&feature=oembed" frameborder="0" allowfullscreen></iframe></p><div style="clear:both"></div><p dir="ltr" > </p><div style="clear:both"></div> <div class="clear"></div>
    </section><!-- .entry-content -->

    10- Finally, and this is not related to your plugin but maybe of some use to you: if I do NOT use your plugin and simply type in my post the above URL (http://www.youtube.com/watch?v=XLgYAHHkPFs), the video will appear embedded. However if the http is turned into https then no video is shown but instead the text of the URL, namely https://www.youtube.com/watch?v=XLgYAHHkPFs will appear in the post.

    I really appreciate if you could give me a hint on what is going on.

  3. dartiss
    Member
    Plugin Author

    Posted 2 years ago #

    @stavroschri - you have Jetpack installed. Are you sure it's not this causing the problem (it uses the same shortcode - if you disable the shortcode functionality in Jetpack it might resolve the problem).

    @wp_follower - not sure what's going on. The code examples you've given me are for where you've just the URL on it's own - this is WordPress functionality and not mine. Can you try adding a video ID between [youtube] shortcodes and, assuming it doesn't display, look at the page source and tell me you're getting?

    David.

  4. wp_follower
    Member
    Posted 2 years ago #

    Dear Dariss:
    I tried again as you prescribed. My post content only contains the following and nothing more:
    [youtube]XLgYAHHkPFs[/youtube]

    No embedded video was observed.
    And then I checked the source code generated upon viewing. The only reference to your code is the same as I had mentioned before:
    <link rel='stylesheet' id='aye_dynamic-css' href='http://localhost:8888/mysite/wp-content/plugins/youtube-embed/css/aye-main.min.css?ver=3.4.2' type='text/css' media='all' />

    In fact if I search for the term 'youtube' in the source code,
    there is absolutely no reference to it other than the above line.

    Thanks.

  5. dartiss
    Member
    Plugin Author

    Posted 2 years ago #

    Ok, add the following code to your functions.php theme file...

    function identify-youtube-function( $atts , $content ) {
    
    	global $shortcode_tags;
    
    	return '<p>YouTube function in use: ' . $shortcode_tags[ 'youtube' ] . '</p>';
    }
    add_shortcode( 'what-youtube', 'identify-youtube-function');

    Now, in the post in which you're trying to get the YouTube video to appear, add..

    [what-youtube/]

    What appears?

    David.

  6. wp_follower
    Member
    Posted 2 years ago #

    Before I start to explain further, here is the content of
    the post in its entirety:
    [youtube]XLgYAHHkPFs[/youtube]

    [what-youtube/]

    OK, here the experiments that I ran and the results:
    1- I added the code to the end of the functions.php and
    the whole postings went down. (that is when I viewed
    the front page, I just got a blank page for the entire
    site.)
    2- I removed the code from functions, and then added it
    to the loop.php of the theme. Here is what it looks like:
    (I have included some sections of the top so you could see
    where I have placed the code):

    <?php
    function identify-youtube-function( $atts , $content ) {

    global $shortcode_tags;

    return '<p>YouTube function in use: ' . $shortcode_tags[ 'youtube' ] . '</p>';
    }
    ?>
    <?php if( have_posts() ) : ?>
    <div id="content" role="main">
    <?php while( have_posts() ) : the_post(); ?>
    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    // some codes go here
    <?php add_shortcode( 'what-youtube', 'identify-youtube-function'); ?>
    <?php endwhile; ?>

    And here are the results when checking the source code for the site:

    The front site containing all posts have the following code:
    <p>[what-youtube/]& nbsp;</p>
    (note that there is no mention of 'YouTube function in use' here)

    In the source code for the post itself:

    <section class="entry-content">
    <p dir="ltr" >[what-youtube/]</p><div style="clear:both"></div><p dir="ltr" > </p><div style="clear:both"></div> <div class="clear"></div>
    </section><!-- .entry-content -->

    (again no traces of 'YouTube function in use' in this source code)

    3- Finally, it occured to me that maybe it will help you to trace the issue better if you become aware of the fact that I am using "minimatica" as the theme. Maybe there is something in this theme which is causing the issue. Perhaps you can ran a quick experiment here on this theme?

    Thanks for all the support.

  7. dartiss
    Member
    Plugin Author

    Posted 2 years ago #

    My bad - I got the code wrong. This is what you need to add to functions.php...

    function identify_youtube_function( $atts , $content ) {
    
    	global $shortcode_tags;
    
    	return '<p>YouTube function in use: ' . $shortcode_tags[ 'youtube' ] . '</p>';
    }
    add_shortcode( 'what-youtube', 'identify_youtube_function');

    Then add the shortcode into your post.

    What this will do is output the function that's using the youtube shortcode. If it doesn't list anything it may be because funtions.php runs before any shortcodes. In which case you'll need to add the above code to youtube-embed.php instead.

    David.

  8. wp_follower
    Member
    Posted 2 years ago #

    Hi David,
    OK this time after adding the new code to functions.php the following appeared on the post itself:

    YouTube function in use: aye_video_shortcode_default

    In the source code of the above page, I found these:

    <section class="entry-content">
    <p dir="ltr" >YouTube function in use: aye_video_shortcode_default</p><div style="clear:both"></div><p dir="ltr" > </p><div style="clear:both"></div><p dir="ltr" > </p><div style="clear:both"></div><p dir="ltr" > </p><div style="clear:both"></div> <div class="clear"></div>
    </section><!-- .entry-content -->

    Thanks.

  9. dartiss
    Member
    Plugin Author

    Posted 2 years ago #

    Ok, so that shows that shows that another plugin is not clashing.

    Can you point me to a URL where you've added a video and it's not appearing? Can you tell me too where exactly the video should be?

    David.

  10. wp_follower
    Member
    Posted 2 years ago #

    I am not sure what you mean. As I mentioned it is
    being tested on a local server. There is no URL. But
    if you mean the URL for the video, try:
    http://www.youtube.com/watch?v=XLgYAHHkPFs

    I think maybe the best course of action is to check
    the theme on your side and see if you encounter the
    same issue as mine.

    Thanks

  11. dartiss
    Member
    Plugin Author

    Posted 2 years ago #

    Looking at the source of the page you provided I can see this...

    <!--YouTube Error: bad URL entered-->

    That's Jetpack, which you must have installed. The solution is to either disable the shortcodes module in Jetpack OR to use an alternative shortcode in my plugin - look at the YouTube Embed Options screen to set these.

    David.

  12. wp_follower
    Member
    Posted 2 years ago #

    David,
    I am not sure if the last comment by you was intended for me or not. But if you meant me, I can assure you that I have NOT installed "Jetpack" (in fact I did not know about this plugin -- and still do not know what it is!! -- till I installed your plugin and started to read about it in your support forum).
    In addition, I am also not sure what source page you had in mind, as the ones that I have sent you has absolutely no reference to to "YouTube Error"
    PS: I can try also to dis-activate ALL my plugins to see if it has any effects.

    Best

  13. wp_follower
    Member
    Posted 2 years ago #

    David,
    A new experiment revealed that despite the fact that you indicated a day ago "that shows that another plugin is not clashing," in fact, there is another plugin in our environment which is causing the issue. The plugin is dealing with text's direction and has nothing to do with Jetpack (which I have not installed).

    My experiment was to deactivate each and every individual plugin and see if it has any effects. Nothing changed until I deactivated the above plugin. And then suddenly youtube video appeared!

    We cannot live without the text's direction plugin and I am not sure how we can go about using yours (I even tried to use a different shortcut in your plugin options to no avail).

    Any suggestion?

    Best

  14. dartiss
    Member
    Plugin Author

    Posted 2 years ago #

    My apologies before about the Jetpack confusion - I was following a link above from another commenter, thinking it was your site. What I was after before, and I don't believe you've provided, is a link to your site where the problem is occuring.

    Can you tell me the plugin that's clashing and I'll see if I can work out why it is?

    David.

  15. wp_follower
    Member
    Posted 2 years ago #

    As I mentioned in my very first post to you, I CANNOT provide you a link to our site as it is NOT published to a web server.

    On the plugin, please check out "WP Direction Detector"

    Best

  16. dartiss
    Member
    Plugin Author

    Posted 2 years ago #

    I've tried that plugin myself now and it does, indeed, cause problems. Generally - not just my plugin. My titles appear incorrectly and, as you know, no video output appears.

    I have no idea why but I don't intend to investigate further - the plugin is a number of years old with no updates and is marked as "beta".

    David.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.