craft-videoembedder icon indicating copy to clipboard operation
craft-videoembedder copied to clipboard

Plug-in periodically stops working

Open codafogo opened this issue 5 years ago • 12 comments

All videos across our whole site have disappeared. When I look at the back-end, it looks like the Video Embedder plug-in just stopped working, but I can’t find any reason for it to do so. The same thing happened Jan 20, 2020 and after a few hours it suddenly started working again. The plug-in is not functioning again now, Jan 27.

The field type is still “Video.” When I go into an entry that was working just earlier today and showing a preview of the video in the back-end, the preview is no longer displaying, and the video is missing from the front-end too, of course. Screen Shot 2020-01-27 at 1 03 18 PM

codafogo avatar Jan 27 '20 21:01 codafogo

Happening for me too, on Craft 3.4.6. Nothing else changed on the site recently. Might be a CORS issue? See https://www.chromium.org/Home/chromium-security/extension-content-script-fetches/

designkarma avatar Feb 26 '20 07:02 designkarma

Happening for us as well

bfjare avatar Mar 10 '20 22:03 bfjare

I'm getting the same issue. Is it a limit from YouTube/Vimeo? For now, I've been using this as a fix:

{% set embedCode = "" %}
{% if 'youtu' in url %}
    {% set id = '?v=' in url ? url|split('?v=') : url|split('youtube.com/') %}
    {% set embedCode = id is iterable ? 'https://www.youtube.com/embed/' ~ id[1] : null %}
{% elseif 'vimeo' in url %}
    {% set id = url|split('vimeo.com/') %}
    {% if 'video/' in id[1] %}
        {% set embedCode = id is iterable ? 'https://player.vimeo.com/' ~ id[1] : null %}
    {% else %}
        {% set embedCode = id is iterable ? 'https://player.vimeo.com/video/' ~ id[1] : null %}
    {% endif %}
{% endif %}

siebird avatar Mar 28 '20 15:03 siebird

Same issue, @siebird thanks for the interim fix!

drifteaur avatar May 15 '20 08:05 drifteaur

Same issue, on Craft 3.4.23. @siebird thanks for the interim fix!

One note: the backend preview works for Vimeo but not YouTube.

webrgp avatar Jun 11 '20 14:06 webrgp

Same problem here. The issue is only with YouTube. Strange enough, on my local site it works just fine. But in the live version (which is identical), all the YouTube videos don't work, only Vimeo functions...

matanlevkowich avatar Aug 20 '20 09:08 matanlevkowich

@matanlevkowich I'm having exactly the same issue: the plugin works fine for YouTube videos locally, but not on the live site.

cakleimeier avatar Oct 13 '20 13:10 cakleimeier

Was the ever a resolution for this both front-end and back-end Or have most of you migrated to another plugin now? If you migrated, what did you choose instead?

terryupton avatar Jan 17 '21 14:01 terryupton

I ended up just uninstalling the plugin and changing my code to work without one. I created a field for Video ID (just the Video ID portion of the YouTube url). The drawback is that you can't see a preview of the video on the back-end to confirm you have the Video ID correct. All our videos are on YouTube, so this works for me.

This is the code I have for the video now, and I haven't had any problems since I made this change.

{% if component.videoId %}
<div class="video">
<iframe src="https://www.youtube.com/embed/{{ component.videoId }}?rel=0" frameborder="0" playsinline="0" allowfullscreen="true"></iframe>
</div>
{% endif %}

Screen Shot 2021-01-17 at 8 28 44 PM

codafogo avatar Jan 18 '21 04:01 codafogo

Had a similar issue as well, hopefully my solution helps someone.

Try updating the embed/embed dependency which this plugin relies on: composer update embed/embed

Dependency link: https://github.com/oscarotero/Embed

This dependency uses the API endpoint: http://www.youtube.com/oembed in older versions of it, when it should be using https://www.youtube.com/oembed. Using the http version will lead to getting a permission denied error.

https://github.com/oscarotero/Embed/pull/418/commits/7dc11da2c917572bfeb4cb32f63e27f877e2c3e8 fixed this.

This might be unrelated but it's worth noting. While debugging I noticed that YouTube was returning a reCAPTCHA on one of our production servers. I tested this on the server by using: curl -i -X GET "https://www.youtube.com/watch?v=aqz-KE-bpKQ" | grep "To continue with your YouTube experience, please complete the form below."

kiwidood avatar Feb 04 '21 03:02 kiwidood

Had a similar issue as well, hopefully my solution helps someone.

Try updating the embed/embed dependency which this plugin relies on: composer update embed/embed

Dependency link: https://github.com/oscarotero/Embed

This dependency uses the API endpoint: http://www.youtube.com/oembed in older versions of it, when it should be using https://www.youtube.com/oembed. Using the http version will lead to getting a permission denied error.

oscarotero/Embed@7dc11da fixed this.

This might be unrelated but it's worth noting. While debugging I noticed that YouTube was returning a reCAPTCHA on one of our production servers. I tested this on the server by using: curl -i -X GET "https://www.youtube.com/watch?v=aqz-KE-bpKQ" | grep "To continue with your YouTube experience, please complete the form below."

Thanks for sharing!

bfjare avatar Feb 04 '21 16:02 bfjare

Had a similar issue as well, hopefully my solution helps someone.

Try updating the embed/embed dependency which this plugin relies on: composer update embed/embed

Dependency link: https://github.com/oscarotero/Embed

This dependency uses the API endpoint: http://www.youtube.com/oembed in older versions of it, when it should be using https://www.youtube.com/oembed. Using the http version will lead to getting a permission denied error.

oscarotero/Embed@7dc11da fixed this.

This might be unrelated but it's worth noting. While debugging I noticed that YouTube was returning a reCAPTCHA on one of our production servers. I tested this on the server by using: curl -i -X GET "https://www.youtube.com/watch?v=aqz-KE-bpKQ" | grep "To continue with your YouTube experience, please complete the form below."

This worked for me too. I used: "embed/embed": "v3.4.17" in my composer.json

Coysh avatar Jul 01 '21 13:07 Coysh