Embeds not working on all websites
-
Hi everyone,
I’ve 3 WordPress websites.
After upgrading to WordPress 5.3.0, all embedded YouTube videos on all websites disappeared.
In the editor, the YouTube block returns this errorSorry, this content could not be embedded.
In WP editor, Chrome console shows this error when I click “Embed”:
api-fetch.min.js?ver=3.6.4:1 GET https://website.com/wp-json/oembed/1.0/proxy?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DvtIIKU2e1rU&_locale=user 404 N @ api-fetch.min.js?ver=3.6.4:1 (anonymous) @ api-fetch.min.js?ver=3.6.4:1 (anonymous) @ api-fetch.min.js?ver=3.6.4:1 s @ api-fetch.min.js?ver=3.6.4:1 (anonymous) @ api-fetch.min.js?ver=3.6.4:1 forEach.t.<computed> @ api-fetch.min.js?ver=3.6.4:1 n @ api-fetch.min.js?ver=3.6.4:1 c @ api-fetch.min.js?ver=3.6.4:1 (anonymous) @ api-fetch.min.js?ver=3.6.4:1 (anonymous) @ api-fetch.min.js?ver=3.6.4:1 (anonymous) @ api-fetch.min.js?ver=3.6.4:1 (anonymous) @ api-fetch.min.js?ver=3.6.4:1 w @ api-fetch.min.js?ver=3.6.4:1 (anonymous) @ api-fetch.min.js?ver=3.6.4:1 i @ api-fetch.min.js?ver=3.6.4:1 (anonymous) @ api-fetch.min.js?ver=3.6.4:1 O @ api-fetch.min.js?ver=3.6.4:1 (anonymous) @ api-fetch.min.js?ver=3.6.4:1 (anonymous) @ api-fetch.min.js?ver=3.6.4:1 i @ api-fetch.min.js?ver=3.6.4:1 (anonymous) @ api-fetch.min.js?ver=3.6.4:1 (anonymous) @ api-fetch.min.js?ver=3.6.4:1 e @ api-fetch.min.js?ver=3.6.4:1 (anonymous) @ api-fetch.min.js?ver=3.6.4:1 L @ api-fetch.min.js?ver=3.6.4:1 (anonymous) @ api-fetch.min.js?ver=3.6.4:1 (anonymous) @ api-fetch.min.js?ver=3.6.4:1 (anonymous) @ api-fetch.min.js?ver=3.6.4:1 (anonymous) @ api-fetch.min.js?ver=3.6.4:1 M @ api-fetch.min.js?ver=3.6.4:1 API_FETCH @ core-data.min.js?ver=2.7.4:1 (anonymous) @ redux-routine.min.js?ver=3.6.2:1 (anonymous) @ redux-routine.min.js?ver=3.6.2:1 e @ redux-routine.min.js?ver=3.6.2:1 (anonymous) @ redux-routine.min.js?ver=3.6.2:1 c @ redux-routine.min.js?ver=3.6.2:1 t @ redux-routine.min.js?ver=3.6.2:1 (anonymous) @ redux-routine.min.js?ver=3.6.2:1 (anonymous) @ redux-routine.min.js?ver=3.6.2:1 (anonymous) @ redux-routine.min.js?ver=3.6.2:1 (anonymous) @ data.min.js?ver=4.9.2:1 (anonymous) @ data.min.js?ver=4.9.2:1 (anonymous) @ data.min.js?ver=4.9.2:1 s @ data.min.js?ver=4.9.2:1 (anonymous) @ data.min.js?ver=4.9.2:1 forEach.t.<computed> @ data.min.js?ver=4.9.2:1 n @ data.min.js?ver=4.9.2:1 c @ data.min.js?ver=4.9.2:1 (anonymous) @ data.min.js?ver=4.9.2:1 (anonymous) @ data.min.js?ver=4.9.2:1 q @ data.min.js?ver=4.9.2:1 (anonymous) @ data.min.js?ver=4.9.2:1 s @ data.min.js?ver=4.9.2:1 (anonymous) @ data.min.js?ver=4.9.2:1 forEach.t.<computed> @ data.min.js?ver=4.9.2:1 n @ data.min.js?ver=4.9.2:1 c @ data.min.js?ver=4.9.2:1 (anonymous) @ data.min.js?ver=4.9.2:1 (anonymous) @ data.min.js?ver=4.9.2:1 s @ data.min.js?ver=4.9.2:1 a @ data.min.js?ver=4.9.2:1 u @ data.min.js?ver=4.9.2:1 (anonymous) @ block-library.min.js?ver=2.9.5:8 (anonymous) @ data.min.js?ver=4.9.2:1 t @ data.min.js?ver=4.9.2:1 (anonymous) @ data.min.js?ver=4.9.2:1 (anonymous) @ data.min.js?ver=4.9.2:1 o @ data.min.js?ver=4.9.2:1 (anonymous) @ data.min.js?ver=4.9.2:1 p @ data.min.js?ver=4.9.2:1 (anonymous) @ redux-routine.min.js?ver=3.6.2:1 (anonymous) @ data.min.js?ver=4.9.2:1 (anonymous) @ data.min.js?ver=4.9.2:1 (anonymous) @ data.min.js?ver=4.9.2:1 (anonymous) @ data.min.js?ver=4.9.2:1 tryAgain @ block-library.min.js?ver=2.9.5:8 (anonymous) @ data.min.js?ver=4.9.2:1 Vh @ react-dom.min.js?ver=16.9.0:163 Uh @ react-dom.min.js?ver=16.9.0:14 Xh @ react-dom.min.js?ver=16.9.0:14 af @ react-dom.min.js?ver=16.9.0:14 Yh @ react-dom.min.js?ver=16.9.0:164 nd @ react-dom.min.js?ver=16.9.0:15 nc @ react-dom.min.js?ver=16.9.0:15 Of @ react-dom.min.js?ver=16.9.0:38 Ac @ react-dom.min.js?ver=16.9.0:39 unstable_runWithPriority @ react.min.js?ver=16.9.0:26 Ma @ react-dom.min.js?ver=16.9.0:52 Be @ react-dom.min.js?ver=16.9.0:119 xi @ react-dom.min.js?ver=16.9.0:39 Show 60 more frames
and this is the return
{"code":"rest_forbidden","message":"\u0639\u0641\u0648\u064b\u0627 \u063a\u064a\u0631 \u0645\u0633\u0645\u0648\u062d \u0644\u0643 \u0628\u0639\u0645\u0644 \u0637\u0644\u0628\u0627\u062a \u0639\u0644\u0649 oEmbed.","data":{"status":401}}
of this WP-JSON url:
https://website.com/wp-json/oembed/1.0/proxy?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DvtIIKU2e1rU&_locale=user
I’ve created a staging site, disabled all plugins, used Twenty Twenty theme and reinstalled WordPress. Yet, the problem still exists!
WordPress version: 5.3.0
Hosting provider: Cloudways
Active plugins: 0
Theme: Twenty Twenty (default theme)Any idea how to fix this issue?
Thanks in advance.
-
this problem fixed now after hostinger transferred my websites to another server , now working fine , thank you Mr-Ahmed Elgameel
Hi Ahmed,
Thanks for trying to help.
Here is my take on the issue. WordPress uses IPV6 connection and your own server IP to make connections to youtube servers. This happens with embedded videos only. I don’t know why this happens.
When you paste the url through PHP, it will work because either:
1- Connection uses user’s IP which is not blocked by youtube.
2- Connection uses your IPV4 which is not blocked by youtube.So, what YouTube really blocks is a range of IPV6 that belongs to your hosting provider and your own server IPV6 happens to be within that range. Why does youtube do this ? I don’t know.
Possible solutions:
1- Completely disable IPV6 on your server. This will force all connections to go through IPV4 which is not blocked.
2- Find a way to force wordpress to connect to youtube using IPV4 only instead of completely disabling IPV6.
3- Find a way to make embedded youtube videos use visitor’s IP and not your server IP.BTW, a lot of hosting providers seem to be affected by this. I know DigitalOcean and CloudWays and few others are.
- This reply was modified 4 years, 3 months ago by abonawaff53.
you can see more about the issue here: https://github.com/ytdl-org/youtube-dl/issues/21729
Hi
I was embed my youtube video in word press.but when i update and refresh the page its showing only URL Please kindly help me.
This is the website : wwww.vollmondacademy.com
The URL : https://vollmondacademy.com/lessons/domain-hosting/?preview_id=24958&preview_nonce=145e72c38a&preview=true&_thumbnail_id=24976- This reply was modified 4 years, 2 months ago by raghav355.
There is a fix for this problem described here on the Linode forums:
You will need to add a line to your active themes funtions.php within wp-content/themes/your_active_theme_name
- The topic ‘Embeds not working on all websites’ is closed to new replies.