Archived topic
Youtube video not embedding
19 replies · Started by Grey on March 22, 2023
Hello,
I'm sorry, I am a newbie and need your guidance. I am trying to embed a video on my website. I haven't had an issue in the past, but now it is giving me this error: "Sorry, this content could not be embedded."
I made sure that:
1. The link I am using is not a "sharing" link. (https://youtu.be/-WBo9EvnrtM)
2. The video on youtube is enabled for embedding and public.
I would also like to know what you recommend as the best way to show a video on my website.
Thanks so much for all the help!
Hi there,
how are you adding the embed to the page ? And does the issue occur if you try adding it to a new draft page ?
Yes, this occurred with a new draft page.
I am adding a youtube block inside a container.
1. The link I am using is not a “sharing” link. (https://youtu.be/-WBo9EvnrtM)
Hmm if you are using a YouTube block then that should be the link to use, not the <iframe> link.
More info here: https://wordpress.org/documentation/article/youtube-embed/
Can you give that a shot?
I tried the link from the web browser URL bar (https://www.youtube.com/watch?v=-WBo9EvnrtM), and gave me the same error.
I tested the first link (https://youtu.be/-WBo9EvnrtM) you provided and it worked:
https://www.screencast.com/t/vLmsQElv0c7
If that's not what you are experiencing, then I'd recommend trying #1 here:
https://docs.generatepress.com/article/debugging-tips/
And if that doesn't help then try #4 in the same article - I don't believe this is a theme related issue.
It seems like the error happens when I am in the editing page, when I go to view page, the video displays just fine.
Ok glad to hear.
If you want to determine the culprit the debugging steps I've suggested here would be necessary:
https://generatepress.com/forums/topic/youtube-video-not-embedding/#post-2577647
We have not had other reports on this so it's likely something specific to your install.
I deactivated all the non-GP plug-ins and the issue still exists.
Are you logged in as an Admin when trying to add the embed ?
Yes, I am.
Just out of interest, does it work with the VideoPress block or classic block?
Reading up on this, it seems the error generally occurs when there is either a user role permission or server permission issue.
If you right click > inspect the page after the error appears to open the developers tools, do you see any errors in the Console tab ?
This is the error I get from inspecting the page:
I believe the error suggested that it's a server issue.
Can you check with your hosting support to see if they can help identify the culprit?
Please make sure to show them the problem with a Twenty series WP theme activated so they can't blame the theme.