All YouTube & Vimeo Links Broken

Home Forums Calendar Products Events Calendar PRO All YouTube & Vimeo Links Broken

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #1130062

    After installing the last update, all of my links to YouTube and Vimeo are broken They instead insert a link to one of the Event Calendar events and not the video.

    This is true on all 3 sites I run with EC Pro.

    See examples here

    Login

    When I deactivate EC & EC Pro, the links to YouTube and Vimeo are restored.

    Please advise on when this can be fixed.

    #1130088
    Cliff
    Member

    Hi. Sorry you’re experiencing this.

    There might be some new updates available. Could you please make sure all your Modern Tribe plugins (and WordPress core) are at their latest versions?

    Once you verify you’re on the latest versions, please test to see if the issue is still happening for you.

    If it is, please follow our Testing for Conflicts Guide and see if that helps narrow down the cause of this.

    If it doesn’t, please share your System Information. That will give me a lot of extra information to help diagnose the problem.

    Let us know what you find out.

    Thanks.

    #1130179

    This reply is private.

    #1130289
    rbinteractive
    Participant

    I had the exact same issue. To fix it (temporarily) you can go to line 1778 of the file /wp-content/plugins/events-calendar-pro/src/Tribe/Main.php

    return tribe_get_upcoming_recurring_event_id_from_url( $url );

    Removing that line will restore your oEmbed links (youtube, vimeo, etc).

    #1130379
    Cliff
    Member

    RB Interactive, thank you very much for your contribution.

    One of our developers investigated this and provided the following notes:

    This code snippet will resolve the issue, which doesn’t modify our plugin’s core files:

    /**
    * Avoid a problem with Events Calendar PRO 4.2 which can inadvertently
    * break oembeds.
    */
    function undo_recurrence_oembed_logic() {
    if ( ! class_exists( 'Tribe__Events__Pro__Main' ) ) return;
    
    $pro_object = Tribe__Events__Pro__Main::instance();
    $pro_callback = array( $pro_object, 'oembed_request_post_id_for_recurring_events' );
    
    remove_filter( 'oembed_request_post_id', $pro_callback );
    }
    
    add_action( 'init', 'undo_recurrence_oembed_logic' );

    Please note this may not work retrospectively. In other words, if oEmbedding already went awry in a number of posts, they won’t automatically be fixed by this, but it should help where new content is oEmbedded thereafter.

    I’ll mark this ticket as Pending Fix, which means this thread should receive a reply once the applicable fix has been released. I cannot guarantee when it will be fixed as it’s in the development team’s hands now. They need to assign it, code it, test it, and schedule it for release. I apologize for this issue and appreciate your understanding and patience.

    #1130472

    Thanks all for the tips.

    Cliff, can you be more specific and tell me where I am to insert this code?

    #1130916
    Cliff
    Member

    Welcome to WordPress customizing! (Even though it wasn’t due to your own initiative 😉

    Best practice for adding custom code (like to implement a PHP snippet to modify The Events Calendar) is to create a functionality plugin, unless it’s something specific to your theme, in which case best practice is to make sure you’re using a child theme, then add the customization to your child theme’s functions.php file.

    However, for this short-term fix (since it can be removed once our plugin is updated accordingly), it’s easiest to just put in your child theme’s functions.php file. If you don’t have a child theme at this time, you can put it in your active theme’s functions.php file but know that the functions.php file will be overwritten if you update your theme before you update our plugin with the fix.

    I hope this information helps!

    #1130952
    Josh
    Participant

    Hi guys, sorry to jump in, but I was having the same issue. Implementing Cliff’s code block above in our functions.php file did the trick. However, I noticed that EC Pro was updated to 4.2.1 today. Does that update include a fix for this issue, or should I leave that code block in place for the time being? I didn’t see a mention of it in the changelog, but I figured I’d ask to be sure.

    Thanks!

    #1130962

    Thank you. that does temporarily fix the coding error from the last release.

    #1131047

    Josh,

    No, the latest release does not fix it.

    #1131061
    Cliff
    Member

    Josh and Joe, yesterday’s plugin update didn’t include this fix, but thanks for asking and for confirming the code snippet works for you.

    #1131077
    Sean Sullivan
    Participant

    I’m also seeing this issue. The TEC developer’s code isn’t making a difference on my site.

    Using 4.2.1 across the board.

    #1131104
    Cliff
    Member

    Sorry to hear that, Sean.

    In that case, please open your own support thread and share your System Information. That will give us a lot of extra information to help diagnose the problem.

    #1131469
    Jonathan Sanderson
    Participant

    Thanks for the swift response, Cliff – that code snippet appears to be solving the problem on my site, including for pages I’ve touched since the problem started. I look forward to the updated plugin, but in the meantime this seems to be a viable fix.

    #1131515
    Cliff
    Member

    Thanks for letting us know, Jonathan.

Viewing 15 posts - 1 through 15 (of 18 total)
  • The topic ‘All YouTube & Vimeo Links Broken’ is closed to new replies.