admin管理员组文章数量:1134247
I have a strange problem with production server and Sensei LMS Vimeo embeded video. When I try to embed video through Vimeo block it works (partially, on second time when I load the page). But when I go to the lesson, there is no video, just the link I put into the block to embed the video.
I found its the tag that is not saved to or ignored or something. I tried it on my local dev environment and its okay. But on production server (which I have full control of) its just ignored. Its not a problem of any plugin, neither theme, nor wordpress itself because I made the exact same copy of the website to my local dev environment and it works.
The dev environment
The production environment
So this is response after I save the post (lesson) Also what it produces is problem that iframe is not display in the actual post.
Second thing I noticed is on production server when I am editing the post the embeded Vimeo never loads on first time and I get a proxy error (screen below)
But when I hit "Try again" it loads
In the end on this last screen there should be Iframe but its not.
Any ideas about security of PHP / Apache maybe ?
UPDATE1: I tried youtube and it works like charm, so maybe I am blocked somehow within the proxy - NO PROXY
UPDATE2: I found when I try to load the video using vimeo block, first attempt fails but retry works, because the url is different
.0/proxy?url=https%3A%2F%2Fvimeo%2F861373728%2Fd3686ef938%3Fshare%3Dcopy&_locale=user
.0/proxy?url=https%3A%2F%2Fvimeo%2F861373728%2Fd3686ef938%3Fshare%3Dcopy&__skip_preload=1&_locale=user
I have a strange problem with production server and Sensei LMS Vimeo embeded video. When I try to embed video through Vimeo block it works (partially, on second time when I load the page). But when I go to the lesson, there is no video, just the link I put into the block to embed the video.
I found its the tag that is not saved to or ignored or something. I tried it on my local dev environment and its okay. But on production server (which I have full control of) its just ignored. Its not a problem of any plugin, neither theme, nor wordpress itself because I made the exact same copy of the website to my local dev environment and it works.
The dev environment
The production environment
So this is response after I save the post (lesson) Also what it produces is problem that iframe is not display in the actual post.
Second thing I noticed is on production server when I am editing the post the embeded Vimeo never loads on first time and I get a proxy error (screen below)
But when I hit "Try again" it loads
In the end on this last screen there should be Iframe but its not.
Any ideas about security of PHP / Apache maybe ?
UPDATE1: I tried youtube and it works like charm, so maybe I am blocked somehow within the proxy - NO PROXY
UPDATE2: I found when I try to load the video using vimeo block, first attempt fails but retry works, because the url is different
https://www.edusteps.sk/wp-json/oembed/1.0/proxy?url=https%3A%2F%2Fvimeo.com%2F861373728%2Fd3686ef938%3Fshare%3Dcopy&_locale=user
https://www.edusteps.sk/wp-json/oembed/1.0/proxy?url=https%3A%2F%2Fvimeo.com%2F861373728%2Fd3686ef938%3Fshare%3Dcopy&__skip_preload=1&_locale=user
Share
Improve this question
edited Sep 7, 2023 at 13:10
smarcin22
asked Sep 7, 2023 at 9:35
smarcin22smarcin22
1014 bronze badges
1 Answer
Reset to default 0Okay after three days of asking SENSEI LMS and Vimeo guys, it looks like everything was okay on their side. Vimeo oEmbeded block is not from sensei lms but directly inside of wordpress. That means I had to deal with wordpress itself. I copied whole database and code into my local development and I figured out that the database was the problem but not because it was faulty but because It had some kind of weird cached code. What I did to resolve this issue was disable Redis / Memcached object cache, disabled any caching features and plugins I had installed and finally removed the WP_CACHE_KEY_SALT from defined constants in wp-config.php. I removed that post and created a new one and voila it works, vimeo video got embedded.
Another thing:
- When embedding a video through Vimeo block make sure you have commented out define('WP_HTTP_BLOCK_EXTERNAL', true); or just set it to false because it is fetched on "Update post" and if external sources are blocked, video is not fetched and in the lesson it will be displayed as a text.
Further investigation:
- looks like its a problem with updating oembedded links. Its a Wordpress problem not Sensei LMS problem. I tried removing one video, saving the post and adding new video. Still the same issue. So what I found is, wordpress fetches oEmbed video details in the database the first time you embed a video. But when you want to change the link or remove the block and a new one, it doesnt update postmeta with new keys. So I tried deleting the rows in the table with _ombed* key and added a new video and updated the post. It worked. I am going to create a new issue for this.
Remove these
本文标签: pluginsIframe beeing removed when embeding a video through block in Sensei LMS (Vimeo)
版权声明:本文标题:plugins - Iframe beeing removed when embeding a video through block in Sensei LMS (Vimeo) 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736806668a1953720.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论