After installing the very latest version of the module (with video refresh) I can create nodes with the Vimeo CCK field ok but then if I try to edit that node and save again the site pauses for a long time before displaying the follow error:

Fatal error: Maximum execution time of 30 seconds exceeded in /includes/file.inc on line 127

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

davidseth’s picture

I got this same error and it was driving me nuts. I had to make some changes to the code to make it work. Attached you will find a diff file with the fixes. Let me know if you have any problems with it.

Cheers,

David

jdelaune’s picture

Status: Active » Needs work

The question is does it download the thumbnail to your server or not? Since it seems your patch just escapes the check to make sure that is has downloaded the thumbnail.

Maybe the fault lies within the vimeo_download_thumbnail() function.

Let me know if your patched copy does download new versions of the vimeo thumbnail onto your server. You'll find them in your files folder in the directory called 'vimeo-originals'.

Thanks

dcanetma’s picture

Hi,

It happened the same to me, but it was after perfoming an updgrade on drupal.

It solved by creating the new vimeo cck field again on the content type. ( I know it's not a solution, I was testing on a development environment ).

But I used the patch anyway, just to avoid embedding the Vimeo flash object a null id movie parameter on the theme_vimeo_formatter_default function.

function theme_vimeo_formatter_default($element) {

 if (isset($element['#item']['value']) && !empty ($element['#item']['value']) ) {
    $video_vid = $element['#item']['value'];
  }
  
  $output = '';
  if ($video_vid > 0) {

    $data = vimeo_cache_video_get($element['#item']['value']);

    $output .= '<object width="'. variable_get('vimeo_width', 640) .'" height="'. variable_get('vimeo_height', 360) .'" class="vimeo-video">
      <param name="allowfullscreen" value="true" />
      <param name="allowscriptaccess" value="always" />
      <param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id='.$data['id'].'&amp;server=vimeo.com&amp;show_title='. variable_get('vimeo_title', 1) .'&amp;show_byline='. variable_get('vimeo_byline', 1) .'&amp;show_portrait='. variable_get('vimeo_portrait', 1) .'&amp;color='. variable_get('vimeo_colour', '00ADEF') .'&amp;fullscreen='. variable_get('vimeo_fullscreen', 1) .'&amp;autoplay='. variable_get('vimeo_autoplay', 0) .'" />
      <embed src="http://vimeo.com/moogaloop.swf?clip_id='.$data['id'].'&amp;server=vimeo.com&amp;show_title='. variable_get('vimeo_title', 1) .'&amp;show_byline='. variable_get('vimeo_byline', 1) .'&amp;show_portrait='. variable_get('vimeo_portrait', 1) .'&amp;color='. variable_get('vimeo_colour', '00ADEF') .'&amp;fullscreen='. variable_get('vimeo_fullscreen', 1) .'&amp;autoplay='. variable_get('vimeo_autoplay', 0) .'" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="'. variable_get('vimeo_width', 640) .'" height="'. variable_get('vimeo_height', 360) .'"></embed>
    </object>';
  }

  return $output;
}

Hope it helps,

D.

davidseth’s picture

It definitely downloads the thumbnails to my computer. I can see the files sitting in the proper directory.

The main bug was the fact that if you created/edited a node without my patch, it would save a null value to the CCK fields value. This would then get passed around in the vimeo module and caues the problems that were first reported above.

The patch does more than remove the infinite check for downloaded images. It also checks for a real value in the CCK field (look at my patched code around line 871 in vimeo.module).

jdelaune’s picture

Sure I agree I need to patch up the second issue and will look more into the first one.

Thanks for your help :)

davidseth’s picture

No worries. Glad to be of assistance. And thank you for creating a great module, really simplifies the whole workflow of easily adding video to a Drupal site.

jghyde’s picture

Component: User interface » Code
Status: Needs work » Needs review
FileSize
3 KB

@davidseth's patch above also solves a problem I was having with the ahah image upload widget for imagecache. I created a CCK type that has an image underlay via imagecache, a description and a link to learn more. In theming, I engineered the view to show all of this on a canvas, and overlaid the vimeo module output atop an image. But the theme allowed the image, caption and link to the shown even if there was no vimeo video in the node. That caused trouble. If there was no vimeo video added to the vimeo field in the node/add form, the ahah image upload widget would timeout (http response 0 error), and in the Apache error_log, pointing back to the vimeo.module as the timeout culprit, at line 470 or so where the vimeo.module was running the vimeo_download_thumbnail function.

This patch for review (my first patch, baby!) does two things:

  1. I had to manually apply @davidseth's happychild_39_f12158a082cb.patch to the vimeo.module. I think David's patch was applied to CVS, not 6.x.1.x-dev 2010-Feb-20 version, or it was created in document root instead of the module dir. Anyway, this patch should fix that.
  2. I added a patch for the http://drupal.org/node/774172 problem I was having. so you may want to combine these issues here if my patch is satisfactory.

This is a great module! I hope I helped make it better.

Joe
http://www.hydeinteractive.com/

jdelaune’s picture

Status: Needs review » Fixed

Thanks guys. I'll commit No.2 soon. As for No.1 I've let it try and download the thumbnail three times, if it still can't then it will continue and present the user with an error. Hopefully that's good enough. Cheers

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.