Vimeo embeds issue resolved
This morning a bug in WordPress became apparent that caused some vimeo videos to not embed properly. Apparently WordPress was using www.vimeo.com instead of simply vimeo.com for the url of embeds which only became apparent this morning after vimeo changed the way they deal with these embeds. To resolve the issue I threw together a quick plugin to use as a hotfix if this issue is affecting you. You can download the plugin, or view the code on github or simply place the code below in your functions.php file.
Good job Sam!
doesn’t seems to work for me. (tested it by activating it in the wordpress plugin) not by adding the code in function.php theme file
@jerome what version of WordPress are you using? I only tested it on our sites running the latest release 3.2.1 and on 3.3 betas but it got our videos working again.
#i’m using the lastest 3.2.1 and I exactly follow you 5:37pm comment…but no way..
I also tested to add the fix_vimeo function in my function.php theme file. And no success again..
one interessant information more..
if I republish the news it sounds to work…!
hum,.. How will I do for my 2500 video news..
i am using a thesis theme. Im not sure where to paste this…
T
@tielman download the plugin here: https://s3.amazonaws.com/sct/vimeo-oembed.php.zip and go to Plugins->Add New in the admin section of your site and then click upload to upload the zip file. Then activate it and you should be ok.
dude, i love you!! it works
Really? I uploaded it to my plugins and activated it. I even refreshed the page with the vimeo link. Am I missing something?
You have to go into Edit your post and click Update.
Sam,
Thanks!
Same problem here, installed he plugin but yet the pages still show http://vimeo.com/xxxxxxxx and do not get an embedded video.
Addendum: If I make a new post it does work. However, all my existing video pages are linked using the “external-videos” plugin which uses a custom post type, could that be the problem? They are still just showing the URL.
Sorry for the multiple posts. Seems the embed lookup caches its results so that the pages I had previously tested (and failed) needed to have these cache entries flushed before they would re-evaluate using the hot fix plugin. I just went into the wordpress mysql database in the postmeta table and deleted all the entries where the meta_key included _oembed_ — Hope this helps someone.
This totally fixed everything when I used the plugin, although I did have to ‘update’ all the posts featuring a vimeo embed. IF wordpress returns the oembed to what it was before will i need to remove the plugin again?
Thanks for all your help and saving of much video embedding bacon!
How did you update all the post? (Or perhaps You only have some..?) because I have to update more than 1 thousand post…
Perhaps Steve Palm, can also help me for this answer?
When I tried to install the plugin I got this error message:
Fatal error: Cannot redeclare fix_vimeo_oembed_providers() (previously declared in /home/kelli/kelmil.com/digitaldesign/wp-content/themes/blogum/functions.php:85) in /home/kelli/kelmil.com/digitaldesign/wp-content/plugins/vimeo-oembed.php_/vimeo-oembed.php on line 14
Also tried to just copy and paste the code in the functions.php file and that didn’t work either… maybe it has to do with my theme?
This error is from enabling the plugin and adding the same code in functions.php
Thanks for the comments everyone. I’ll have to look into how this oembed cache works to see if there is an easy way to correct the matter with this plugin.
Thanks Sam that worked, but I did have to update all the posts like Jonny did, not a huge deal. Thanks for the fix!
I tried embedding without the www. on WP 3.3 Beta 1 and it worked fine, so this shouldn’t be necessary in the future.
Sam,
Thanks.
Chris