Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Had no issues using Emfield 6.x-1.7 for a long time. Yesterday, however, all Dailymotion thumbnails stopped working.
Comments
Comment #1
HS CreditAttribution: HS commentedCould this be the issue?
The thumbnail pulled by Emfield is http://www.dailymotion.com/thumbnail/160x120/video/[ID]
and DM uses this now: http://static2.dmcdn.net/static/video/525/067/36760525:jpeg_preview_medi...
Comment #2
perpignan CreditAttribution: perpignan commentedTo have the good path of the thumbnail, the thing is to extract the path from http://www.dailymotion.com/api/oembed?url=http://www.dailymotion.com/vid...
Example :
$id="VideoID";
$xml=simplexml_load_file("http://www.dailymotion.com/api/oembed?url=http://www.dailymotion.com/video/".$id."&format=xml");
if($xml) {
$xml->thumbnail_url;
}
Comment #3
perpignan CreditAttribution: perpignan commentedTo have the correct path, i do on module media_video_flotsam, in the file providers/dailymotion.inc
line 125 :
function emvideo_dailymotion_thumbnail($field, $item, $formatter, $node, $width, $height) {
$xml=simplexml_load_file("http://www.dailymotion.com/api/oembed?url=http://www.dailymotion.com/video/".$item['value']."&format=xml");
if($xml) {
return $xml->thumbnail_url;
}
}
Comment #4
HS CreditAttribution: HS commentedI'm experiencing this on 6.x-1.7 are you experiencing this on 2.5 as well?
Comment #5
HS CreditAttribution: HS commentedThis is the current code,
How do I change that? Thank you for the help!
Comment #6
perpignan CreditAttribution: perpignan commentedI change this code
To this :
Perhaps, it's not the better thing to do... But it's working now ! :)
Comment #7
HS CreditAttribution: HS commentedThanks for replying. I tried that and it replaced the thumbs for all DM videos with my specified default thumbnail.
Comment #8
HS CreditAttribution: HS commentedSeeing the following in my logs after making your change,
Comment #9
perpignan CreditAttribution: perpignan commentedIt's because in your php.ini, you surely have "allow_url_fopen" at "Off", you can change value to "On" to allow open an external url.
Comment #10
HS CreditAttribution: HS commentedI don't see that setting in my php.ini file? How do I add it? Thank you for your help!
I'm using PHP 5
Comment #11
HS CreditAttribution: HS commentedisn't enabling 'allow_url_fopen' opening your self to security vulnerabilities? I hear Curl is a better method?
Comment #12
HS CreditAttribution: HS commentedIs there a version of Emfield I can safely upgrade to from version 6.x-1.7, where I don't need to hack the code?
Edit: Just noticed that all versions have this issue.
Comment #13
Youpinadi CreditAttribution: Youpinadi commentedThere has been a regression in the thumbnail code, we fixed it and it is now live. Sorry for the convenience.
The good way to access a dailymotion thumbnail is: http://www.dailymotion.com/thumbnail/160x120/video/[ID] (this url redirects directly to our cdn)
Comment #14
Youpinadi CreditAttribution: Youpinadi commentedComment #15
BBaptiste CreditAttribution: BBaptiste commentedIt works again !
Thank for this fixes.
Comment #16
HS CreditAttribution: HS commentedReceived the email below from the DM team today (Thank you to Youpinadi) but still doesnt work.
See this thumbnail, for example: http://www.dailymotion.com/thumbnail/160x120/video/xlp7q4
Comment #17
HS CreditAttribution: HS commentedThanks DailyMotion team, it works now.
Comment #18
attackattack CreditAttribution: attackattack commented