Not yet sure why I'm getting this error, I just installed video and uploaded a video and I'm attempting to view a view with the content item in it and getting this error.

CommentFileSizeAuthor
#4 video-1052314.patch38.07 KBpjsz

Comments

ivrh’s picture

Title: Fatal error: Cannot access empty property in sites/all/modules/video/includes/video_helper.inc on lin » Fatal error: Cannot access empty property in sites/all/modules/video/includes/video_helper.inc on line 36
Priority: Normal » Major

The issue is still there.
After installing Video module - pages (non-vide content type) fail to load with the following error:

Fatal error: Cannot access empty property in .../sites/all/modules/video/includes/video_helper.inc on line 36

Page of Video content type (with file upload CCK field as Video widget) load fine. It is other content types don't load (they have file upload CCK field).

stallberg’s picture

Version: 6.x-4.2-beta2 » 6.x-4.2

I get the same error "Fatal error: Cannot access empty property in ..drupal6\sites\all\modules\video\includes\video_helper.inc on line 35".
Page doesn't get rendered any more. It occurs only on pages, where no video is included, but which dokument-type has a cck-field of type video. It seems that video_helper.inc can't handle requests without content.

I tried theming my node-template to print out information about the video only if content existed - but that did not prevent the error above.

"field_video" is the name of my CCK-Field for videoupload
-----
if (!empty($field_video)) {
echo $field_video[0]['view'] ;
}
else unset ($field_video);
-------

I have looked up the mentioned lines 35 (36) that is:

-----
// Build our video object for all types.
$video = new stdClass();
$video->fid = $element['#item']['fid'];
$video->original = $element['#item'];
$extension = strtolower(pathinfo($element['#item']['filename'], PATHINFO_EXTENSION));
35 $video->files->{$extension}->filename = pathinfo($element['#item']['filepath'], PATHINFO_FILENAME) . '.' . $extension;
36 $video->files->{$extension}->filepath = $element['#item']['filepath'];
-----

Can anyone help?

My system has following dates:
Video 6.x-4.2
PHP 5.3.0
MySQL-Datenbank 5.1.37
Drupal 6.22

alaugh’s picture

Having the same issue here. Hoping someone has a solution.

pjsz’s picture

StatusFileSize
new38.07 KB

I had same issue. Here is a patch. The problem is the $video->files class is not being initialized and also the $extension can be empty at times. My error showed up when adding video nodes behind the scenes in hook_nodeapi.

All the patch does is initialize the $video->files to a new object and then only set the data in there if the $extension exists. I had one case where the extension was blank.

Good luck. HTH.

Jorrit’s picture

Status: Active » Fixed

I have added some debugging information for this situation, which may help why this error occurs. Please reopen if you encounter this debug message.

Status: Fixed » Closed (fixed)

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