Hi,

I'm getting the below fatal error when clicking "Add Media" on a kaltura video upload field. I get it in both the dev branch and the 2.x-beta branch. To get the error, the content ingestion widget settings need to be: "Use existing media and add new media"

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /kaltura/ajax/existing/field_video/field_kaltura_video/%7B%22kshow_id%22%3A0%2C%22partner_data%22%3A%22%22%2C%22type%22%3A%22entry%22%2C%22context%22%3A%22field%22%2C%22field_id%22%3A%22field_video%22%2C%22ui_conf%22%3A4396041%2C%22wtype%22%3A%22field_kaltura_video%22%2C%22add_existing%22%3A%22both%22%2C%22button_text%22%3A%22Add%20Media%22%7D
StatusText: OK
ResponseText:
Fatal error: Call to undefined method stdClass::preview() in /sites/all/modules/kaltura/kaltura.module on line 370

There is also a watchdog error at the same time which is: 1702 21/Oct 16:24 notice php Notice: Use of undefined constant display_options - assumed 'display_options' in kaltura_existing() (line 364 of //sites/all/modules/kaltura/kaltura.module).

I'm using the Kaltura Commercial service
No problems are reported at admin/config/media/kaltura/general.

Any ideas? Line 370 seems to be calling the preview function of a view object.

Thanks so much,
Travis McCauley
University of Virginia

Comments

Jim M’s picture

I got the same error. The only way I figured out around it was to shut off line 370 with a comment tag. I can't say I like the upload interface very much, but the fix worked to at least get me that far.

travismccauley’s picture

The problem seems to be the the $view object is of type stdClass rather than views_display_plugin. Makes sense I guess. Above, it tries to lod a view that doesn't exist. I enabled the module kaltura_views and the error went away.

This block should be wrapped in if(module_exists('kaltura_views') {...}

gambaweb’s picture

Status: Active » Closed (fixed)

thanks for the report.
the kaltura module is depended on the views module and kaltura_views.
added to info file.