The video_upload plugin does not define the field of the file to be uploaded as required. Users can create a video node and forget to submit the file to upload for ffmpeg_helper.

Just set the field as required in _video_upload_form function, in file video_upload/video_upload.module.

/**
* Create video upload specific form fields
*/
function _video_upload_form($node) {
  _video_upload_check_settings();

  $form = array();

  $form['video_upload_file'] = array(
  '#type' => 'file',
  '#title' => t('Upload video file'),
  '#size' => 40,
  '#weight' => -19,
  '#description' => t('The uploaded file will be used as video file for this node.<br /><b>NOTE:</b> The max upload size is'
) . ' ' . format_size(_video_upload_get_max_upload_size()) . '.',
  '#required' => TRUE,
  );

Comments

pmetras’s picture

I forgot to past the end of the function, where we have to set the field as non mandatory when in edit mode...

  if (isset($node->video_upload_file)) {
    $form['video_upload_file']['#prefix'] = theme('video_upload_file_info_form', $node);
    $form['video_upload_file']['#title'] = t('Replace with');
    $form['video_upload_file']['#required'] = FALSE;
  }

  return $form;
}
fax8’s picture

Status: Needs review » Fixed

Thanks for your help. The new code implement something similar.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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