• Resolved kentnerd

    (@kentnerd)


    Hello,

    First, thank you so much for an awesome plugin!

    My client is seeing this error on their website and their latest youtube video is not displaying:
    “Failed to retreive video ID”
    (this error message is near the bottom of the Home page, under “Stay Updated”)

    This recently happened and I’m not sure how to fix it. The plugin had been working flawlessly since we installed it a while ago, but it just stopped working.

    The shortcode we use to generate the video is this:
    <?php echo do_shortcode(‘[youtube_recent channel=”client channel id is here”]’); ?>

    I made sure to include the Youtube Data API key and the Youtube Channel ID under Settings > Youtube Channel > General.

    I got the Channel ID from my client’s youtube account, and I got the api key from here. For the api key, I made sure to add a restriction by selecting “Youtube Data API v3”.

    Any ideas on what could be causing this error?

    • This topic was modified 4 years, 5 months ago by kentnerd.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Aleksandar Uro?evi?

    (@urkekg)

    Hello @kentnerd,

    I’m a little bit puzzled here. The shortcode syntax ou provided in your report [youtube_recent channel="client channel id is here"] is not for YouTube Channel plugin. Shortcode for our plugin should be [youtube_channel channel="Channel ID" resource="0"]

    At the moment I see embedded youtube video below the STAY UPDATED heading, but it’s not embedded by YouTube Channel nor there is any message from YouTube Channel.

    Can you please confirm you still use YouTube Channel on the referred website?

    Thank you for understanding,
    Aleksandar

    Thread Starter kentnerd

    (@kentnerd)

    Hi Aleksandar,

    Thank you so much for the reply.
    Yes, we still use your plugin for the site.

    I changed the shortcode from this
    <?php echo do_shortcode(‘[youtube_recent channel=”UCAHSGmsqR572xrtTDQmgzPg”]’); ?>

    to this:
    <?php echo do_shortcode(‘[youtube_channel channel=”UCAHSGmsqR572xrtTDQmgzPg”]’); ?>
    and this:
    <?php echo do_shortcode(‘[youtube_channel channel=”UCAHSGmsqR572xrtTDQmgzPg” resource=0]’); ?>
    and this:
    <?php echo do_shortcode(‘[youtube_channel channel=”UCAHSGmsqR572xrtTDQmgzPg” resource=”0″]’); ?>

    but for all 3, I received an error on the page saying that I have reached a quota limit?

    An interesting note is that the previous developer who created the site used [youtube_recent channel] and it actually displayed the video.

    Last note is that I’m testing this all on a staging/clone site (since I don’t want to make changes to the live site).

    For now, since I can’t get the plugin to work, I’ve decided to just download a copy of the video and add an <iframe src=””> to the page (which works fine).

    Plugin Author Aleksandar Uro?evi?

    (@urkekg)

    Hi @kentnerd,

    If you still getting same quota error, check on the Google Cloud console stats for YouTube API Key that you use on your site https://console.cloud.google.com/apis/api/youtube.googleapis.com/quotas

    What you can do is to restrict YouTube API Key which you use per IP and whitelist only IPs of the server where you host your websites (staging and production). Check out https://drive.google.com/file/d/1BSt3vRIC_2s6YU8vVLc_8jsoVLXGCZGs/view?usp=sharing

    Btw, YouTube Channel never had shortcode [youtube_recent] so could be that before you used some other plugin.

    Cheers,
    Aleksandar

    Thread Starter kentnerd

    (@kentnerd)

    Hello Aleksandar,

    I added the restriction and whitelisted the IPs of my host’s server, but now I get a new error. There is a note on that “Key restrictions” page that says: “Note: It may take up to 5 minutes for settings to take effect”. It’s been a day now and I still see the same error.

    And yes, the previous developer who worked on my client’s website added the shortcode [youtube_recent]. I’m not sure why. I’ve since changed it to [youtube_channel channel=””].

    Thank you so much for your assistance throughout.

    Plugin Author Aleksandar Uro?evi?

    (@urkekg)

    Hello @kentnerd,

    As you can see on the screenshot you provided, IP address from your server is not whitelisted on API key (maybe you whitelisted IPv4 but you also have to whitelist IPv6 address which is stated in the error message).

    Please let me know if that resolve issue?

    Kind regards,
    Aleksandar

    Thread Starter kentnerd

    (@kentnerd)

    Hello Aleksandar,

    I apologize for such a late response.

    I actually decided to deactivate the plugin because I found a different solution to adding the video. I just provided a custom shortcode for my client for adding her latest youtube video, which so far has worked just fine.

    You can close this ticket.

    Thank you so much for your assistance throughout this process.

    Happy New Year!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Error: Failed to retrieve video ID’ is closed to new replies.