I am working on localhost to develop a simple website using video_embed_field. Everything worked great right from the get go! Great module!
....But then when I was ready to test on my live site, my YouTube thumbnails would not show up when creating new videos. From deeper research I discovered that the thumbnails were not being downloaded to my website, and therefore could not be image cached into the thumbnail size I wanted.
I discovered this issue from Media_Youtube http://drupal.org/node/1180386#comment-5434644 which explains that drupal_http_request should be compatible with all installs rather than the use of copy(). Below is how I changed the code in video_embed_field.field.inc to test out if this was causing my thumbnails not to show up.
replaced:
@copy($thumb_url, $local_path);
with...
$response = drupal_http_request($thumb_url);
if (!isset($response->error)) {
file_save_data($response->data, $local_path, TRUE);
}
else{
@copy($thumb_url, $local_path);
}
I then resaved the content that was supposed to display the thumbnails.... and it worked!
I cant really explain why it works now, but im sure someone with better php skills can :)
I hope this helps someone who is having similar issues.
Comments
Comment #1
jec006 CreditAttribution: jec006 commentedThanks, committed the fix here: http://drupal.org/commitlog/commit/25834/1dde1032497e1d94b59c718ebd1e9c9...
Comment #2
jec006 CreditAttribution: jec006 commented