0

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 enter image description here

The production environment enter image description here

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)

enter image description here

But when I hit "Try again" it loads

enter image description here

In the end on this last screen there should be Iframe but its not. enter image description here

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

1 Answer 1

0

Okay 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

Remove these

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.