Updates from October, 2011 Toggle Comment Threads | Keyboard Shortcuts

  • Sam Margulies 1:21 pm on October 13, 2011 Permalink | Reply  

    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.

     

    22 comments on “Vimeo embeds issue resolved

    1. Good job Sam!

    2. jerome on said:

      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

      • Sam Margulies on said:

        @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.

        • jerome on said:

          #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.. :(

        • jerome on said:

          one interessant information more..
          if I republish the news it sounds to work…!
          hum,.. How will I do for my 2500 video news..

    3. tielman on said:

      i am using a thesis theme. Im not sure where to paste this…
      T

    4. Sam Margulies on said:

      @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.

    5. tielman on said:

      dude, i love you!! it works :) :) :) :)

    6. Really? I uploaded it to my plugins and activated it. I even refreshed the page with the vimeo link. Am I missing something?

    7. charper on said:

      Sam,
      Thanks!

    8. Steve Palm on said:

      Same problem here, installed he plugin but yet the pages still show http://vimeo.com/xxxxxxxx and do not get an embedded video.

    9. Steve Palm on said:

      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.

    10. Steve Palm on said:

      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.

    11. 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!

      • jerome on said:

        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?

    12. kelmil on said:

      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?

    13. Sam Margulies on said:

      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.

    14. kelmil on said:

      Thanks Sam that worked, but I did have to update all the posts like Jonny did, not a huge deal. Thanks for the fix!

    15. Jonathan Warren on said:

      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.

    16. charper on said:

      Sam,
      Thanks.
      Chris

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    *

    HTML tags are not allowed.

  • Sam Margulies 12:56 pm on June 15, 2011 Permalink | Reply  

    Delete Custom Fields Plugin 

    A list of custom fields including "category", "enclosure", and "syndication_feed_id"

    Custom fields available on one SCT site

    One common annoyance that comes from managing a WordPress site that uses custom fields is the inevitable wrongly-entered custom field. This issue confounds users wherever they are directed to enter something in the Custom Fields Box. The problem is, once a custom field is saved, it is displayed as an option to all users entering a custom field — giving an ever larger group of users the option to enter the wrong field.

    The erroneous custom field issue poked its head on Philadelphia Neighborhoods recently, where students were getting confused when they tried to enter a custom field used to show the author of the post. Since there was a post floating around somewhere on the site with a “byline” custom field, that options shows up in the list of custom fields to choose from, along with the correct field, “author”. I set out to find a quick solution to remove these custom field options. It turns out, to remove a custom field from the list of options, you need to find the post it is used in and delete the custom field. This can prove difficult since there is no easy way to figure out which post has the offending custom field. The custom field can be on a post in the trash, or even for a hidden post type used by a plugin, making a successful search even more hopeless. The only option around seemed to involve poking around directly in the database, which is never a good idea.

    To solve this pesky problem once and for all I created a simple plugin called Delete Custom Fields. It will simply remove every instance of a custom field found on the site.

     

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    *

    HTML tags are not allowed.

c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
esc
cancel