• Resolved Alekz

    (@alkz)


    The embed shows and plays OK while on the website but when you click the “Watch on YouTube” button this error appears:

    www.youtube.com is blocked
    
    www.youtube.com refused to connect.
    
    ERR_BLOCKED_BY_RESPONSE

    The iframe is being rendered like this, with a lot of extra stuff at the end of the embed src url. The original post only has the YouTube link in it so it’s WordPress or Jetpack that are rendering it like this.

    <iframe loading="lazy" class="youtube-player" width="1080" height="608" src="https://www.youtube.com/embed/stsqoCeyINE?version=3&rel=1&showsearch=0&showinfo=1&iv_load_policy=1&fs=1&hl=es-ES&autohide=2&wmode=transparent" allowfullscreen="true" style="border:0;" sandbox="allow-scripts allow-same-origin allow-popups allow-presentation"></iframe>

    I got here through this post but it’s on the main WP forum so I guess we have to post here too. It appears Jetpack is the culprit.

    Thanks in advance!

    • This topic was modified 1 year, 4 months ago by Alekz.
    • This topic was modified 1 year, 4 months ago by Alekz. Reason: adding context and tags

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Erina (a11n)

    (@eri32s98)

    Hi @alkz , thanks for sharing all these info. I was able to replicate the error with Chrome, but it worked with Firefox and Safari. Which browser did you try?

    From your other thread, you mention using a Classic Block to embed the YouTube video, could you test using the YouTube block?

    Thread Starter Alekz

    (@alkz)

    Hello Erina, thank you so much for your reply.

    You are correct, the problem doesn’t seem to happen when using Firefox, but it still happens on Chrome for some reason.

    I am using the new WP block editor to embed the video (though I think the OP on the referenced thread is using classic indeed). In my writing process I just paste the YouTube URL in the editor and WP automatically converts it to a YouTube block.

    Just to be sure, with diagnostic mode enabled (no plugins) I deleted the existing YouTube block and created the YouTube block again using the block UI (plus sign – YouTube – paste url), but the result is the same. This suggests Jetpack is doing something to the block when the post is rendered and it’s not an issue of the original information from when the post was created.

    Also, while using diagnostic mode (default theme, no plugins) I tried clicking the same part of the embed and the link to YouTube worked fine.

    Thanks again!

    Plugin Support Alin (a11n)

    (@alinclamba)

    Hi @alkz,

    Thank you for sharing further details. I’ve followed your steps and attempted to replicate the issue on a test site; everything worked as expected there. However, when I tried the same on the site you shared, I was indeed able to replicate the problem. This makes me believe that perhaps our approaches to embedding the video might differ in some way.

    Here’s what I did on the test site:

    • I pasted the YouTube video link directly into a post. Although I didn’t specifically select a block, WordPress automatically converted it into a YouTube block.
    • Upon clicking the “View on YouTube” button, a new tab opened in my browser, directing me to the video on YouTube without any issues.

    Could you confirm if this matches your process of embedding the video? Understanding the exact steps you’re taking will help in further investigating and addressing the issue.

    Thank you!

    I turned off “Compose using shortcodes to embed media from popular sites” and it fixed the issue

    this is found in Settings / Writing / Composing

    Thread Starter Alekz

    (@alkz)

    Thank you NightL, I tried your solution and I can confirm it does remove the problem! YouTube embeds are working fine now.

    Just to be clear in case anyone finds this through Google: that setting can be found in the Jetpack plugin settings, not in WordPress settings (I was confused at first).

    Also thank you Alin for your help looking into this. Yes, that matches the process of embedding the video although the issue was still present until I tried NightL’s solution.

    Thanks everyone! I’ll do some more testing but for now I’ll mark this as resolved.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘YouTube video embeds lead to refuse to connect error’ is closed to new replies.