Hello,

Since yesterday all our videos hosted on vimeo, are no longer displaying on our site and the following notice is displaying
"Notice : Undefined index: video_id dans _video_embed_field_get_vimeo_id() (ligne 454 dans /home/xxx/www/sites/all/modules/video_embed_field/video_embed_field.handlers.inc)."

I've looked at the code inside the video_embed_field.handlers.inc file and I don't see anything

function _video_embed_field_get_vimeo_id($vimeo_data) {
  try {
    $video_id = $vimeo_data['video_id'];
  } catch (Exception $e) {
    $video_id = FALSE;
  }

  return $video_id;
}

Can you please help ?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Kitty77 created an issue. See original summary.

Kitty77’s picture

Anyone is having this issue ?

junghandy’s picture

I'm running into this same issue and it turned out to be Vimeo blocking requests from our IP.

Here's the message I receive back from Vimeo:

# curl http://vimeo.com/api/oembed.json?url=https://vimeo.com/175191424
{
    "error": "You have been banned.",
    "link": null,
    "developer_message": "You have been banned. Contact vimeo support for more information.",
    "error_code": 3500
}
canardesign’s picture

Same problem here, sent an email to vimeo support

canardesign’s picture

Hey, after 6 months, it happens again :

Request : GET /api/oembed.json?url=https%3A%2F%2Fvimeo.com%2F138942671 HTTP/1.1
User-Agent: Drupal (+http://drupal.org/)
Accept: */*
Host: vimeo.com

Status message :  Forbidden  

Data:
"error": "You have been banned.",
"link": null,
"developer_message": "You have been banned. Contact vimeo support for more information.",
"error_code": 3500

Sent a new request to vimeo support :(
Anyone knows why they ban people ?

joelstein’s picture

Title: Vimeo link suddenly broken, undefined index error » Parse video ID when unable to use Vimeo's API
Assigned: Kitty77 » Unassigned
Category: Support request » Bug report
Status: Active » Needs review
FileSize
1.7 KB

The issue here is that if Vimeo decides to ban your IP address, you won't have access to the API or oEmbed endpoints.

However, the video ID is in the URL, so we can simply fall back to parsing the ID out with PHP in the event that are unable to get this information from Vimeo's API.

Here is a patch which uses this patch to match quite a few Vimeo URL patterns. Works like a charm!