On every page where I have a video field I get this error:
Notice: Undefined index: jpg in theme_video_formatter_player() (line 71 of /modules/video/video.theme.inc)

Even when I do a search if there is a result with that node with a video field in it I get this error message. The video plays fine, just this nasty error message.

It looked like http://drupal.org/node/1284984 but not sure its the same issue since I have a different version of Video and no mention of jpgs

Thanks

Comments

Jorrit’s picture

Status: Active » Postponed (maintainer needs more info)

For some reason, you managed to upload a JPEG picture as a Video. Can I see the page on which this occurs?

pandersb’s picture

This has something to do with the Default Video Thumbnail. When I upload a default photo, I get this error. When I leave it blank, the error disappears. My posting doesn't even have to have a video uploaded in the field for this error to show up.

Polyspiral’s picture

You're right pandersb, removed default thumbnail and now no error messages.
Jorrit, no pretty sure I haven't uploaded a image instead of a video, I think it's when I set a default thumbnail I get this error. Bit of a bug there if it does this, but means there are no error messages on the website now.
Thanks pandersb

Jorrit’s picture

I have changed a lot of code since 7.x-2.4, especially when it comes to thumbnail handling. Is it possible for you to test the latest 7.x-2.x-dev release? I will release 7.x-2.5 this week, so if you want to wait for that it's fine with me. If you test the -dev release, make sure to make backups or do it on a separate installation.

Polyspiral’s picture

Hi Jorrit, would like to help, but this website I'm building goes live soon, so I'de rather wait for the next release if thats OK.
Thanks for your help x

Jorrit’s picture

I think I have found the problem. Could you try the following:

open video.field.inc and remove the following block of code:

function video_field_prepare_view($entity_type, $entities, $field, $instances, $langcode, &$items) {
  // If there are no files specified at all, use the default.
  foreach ($entities as $id => $entity) {
    if (empty($items[$id]) && $field['settings']['default_video_thumbnail']['fid']) {
      if ($file = file_load($field['settings']['default_video_thumbnail']['fid'])) {
        $items[$id][0] = (array) $file + array(
          'is_default' => TRUE,
        );
      }
    }
  }
}

Please let me know if it removes the error message.

Jorrit’s picture

Status: Postponed (maintainer needs more info) » Fixed

Unfortunately, you haven't confirmed if the fix works, but I have tested it myself for a while and it seems to be safe to remove the function.

Status: Fixed » Closed (fixed)

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