We're attempting to get Ooyala up and running on our Drupal 7 site. Originally, we were given a "Partner code" and "Secret code", which were designed to communicate with the newest version of the Ooyala API. After encountering various problems (see attached screenshots), we were told that the Drupal 7 module has not yet been updated to work with the latest version of the Ooyala API. So, the Ooyala team gave us a new "Secret code", which communicates with the old Ooyala API instead. This solved some of our problems, but we're still experiencing errors. I'm documenting these errors here.

Thank you Ooyala and Lullabot for all of your help!

Comments

Anonymous’s picture

It's been suggested that we re-install the Ooyala module from scratch, since we changed the "Secret code" post-installation. We have yet to try this.

deviantintegral’s picture

Status: Active » Needs review
StatusFileSize
new1.39 KB

I think the issues related to the new API are beyond the scope of what we can fix, unless there's an API we can use to explicitly talk to the v1.0 API. I can't find any docs or announcements about the new API - a link would be great.

There's two issues based off of the screenshots posted. First, there's an issue with trying to save the video length when Ooyala hasn't calculated it yet. I've attached a patch for that.

The other issue is that for some reason, our Views integration hooks are being called even though they explicitly declare themselves as being for Views 2. A workaround would be to remove the ooyala_views_api() function from ooyala.module. I've opened up a new issue to track updating the module to work with Views 7.x-3.x at #1281942: Update Views support to support 7.x-3.x.

Anonymous’s picture

StatusFileSize
new35.56 KB

Great! Thanks for the patch! We're now able to upload videos and the player is displaying correctly on node pages.

We've discovered an issue with the video thumbnails, however. They're not being generated or saved on the web server (see attached screenshot). We've uploaded multiple videos via the Drupal field, but the "thumbnail file path" directory is empty. Clicking "Preview/refresh thumbnail" and "refresh thumbnails" doesn't seem to do anything. It always says "no preview available". These videos have finished processing on Ooyala's end, and can be played on the node page.

Thanks!

Anonymous’s picture

StatusFileSize
new245.93 KB

I may have spoken too soon. It looks like we're still getting errors while attempting to save new nodes. It works properly most of the time, but still fails occasionally. We're using a "secret code" for the old API, and we've applied the patch in comment #2.

deviantintegral’s picture

StatusFileSize
new2.23 KB

The previous patch missed setting the video length if Ooyala had determined it. Let's try this one out.

Anonymous’s picture

StatusFileSize
new81.88 KB
new41.69 KB

We uninstalled the module, applied the patch in comment #6, then reinstalled the module. We're still experiencing some problems:

We uploaded a WMV file via the Ooyala field. It reached 100% and appeared to work, but Drupal threw the following error when we saved the node (see "embedcodes-error.jpg"). When we edit this node, the Ooyala field is empty, as if the video had never been uploaded.

Update 1: After some time, the above error went away, and the Ooyala video player started appearing on the node page. However, Drupal is now throwing a different error (see "thumbnail-error.jpg").

Update 2: After some more time, the above error also went away. There are no more errors on the node page, and the video is playing properly. However, we're still experiencing the thumbnail problem described in comment #3.

Thanks!

deviantintegral’s picture

I got around to checking again on the 6.x branch. Thumbnails do work, though it took a while for them to actually be returned by the Ooyala API. So, I think it's likely there's an issue in the 7.x code, and not with the Ooyala API.

I did get a strange watchdog message at one point that I should open a new issue for:

"The thumbnail for the channel "lhNW10Mjpf9zjo-UcloWAEG0l6udYcfy" could not be retrieved from Ooyala. It looks like this embed code is for a channel, but this channel does not contain any videos that have a usable thumbnail."

That embed code was for a video.

deviantintegral’s picture

StatusFileSize
new3.17 KB

Here's a patch that addresses the issue with looking up a video embedcode as if it was a channel.

The issue with the thumbnails appears to be that the Ooyala API isn't returning a promoThumbnail. Though it's not clear, I think that's supposed to be included with all processed videos. I'll contact Ooyala and see what's up.

deviantintegral’s picture

StatusFileSize
new5.07 KB

I was wrong about the promoThumbnail - it was there, I was just missing it in the XML. I did find another issue though, in that if the site doesn't have a files directory explicitly set the default value was empty (''). Here's a patch with that included.

Anonymous’s picture

We downloaded the latest dev version (September 22), then applied the patch in comment #10.

--------------------------------------------------------------------------
When we used the "secret code" for the old Ooyala API:
--------------------------------------------------------------------------

On the node edit pages, there are no longer any empty thumbnail slots in the Ooyala field. However, when we select a different image, save the node, then edit the node again, it seems to revert back to the previous image. It doesn't seem to be saving. Perhaps the Ooyala server needs time to process the change? I'll check again in a little while.

Also, it doesn't seem to be saving images to our web server. The thumbnail file folder is still empty.

--------------------------------------------------------------------------
When we used the "secret code" for the new Ooyala API:
--------------------------------------------------------------------------

On the Ooyala settings page (admin/config/media/ooyala/settings), we're getting the following error:

Notice: Undefined index: totalResults in ooyala_api_video_query() (line 122 of /home/.../sites/all/modules/ooyala/includes/ooyala.api.inc).
Notice: Undefined index: size in ooyala_api_video_query() (line 123 of /home/.../sites/all/modules/ooyala/includes/ooyala.api.inc).
Notice: Undefined index: pageID in ooyala_api_video_query() (line 124 of /home/.../sites/all/modules/ooyala/includes/ooyala.api.inc).

When editing an existing node, the thumbnail selector is gone.

When saving an existing node (which already had a video prior to applying the patch), we're getting the following error. However, the video player is appearing and playing correctly:

<?xml version="1.0"?> <result code="400 Bad Request" message="The signature is invalid."/>

We did not uninstall the module prior to applying the patch. Perhaps we should uninstall it now, then reinstall? I didn't think this was necessary, because I didn't see any database updates in the patch.

Thanks!

steingard’s picture

Hey, just wondering what's going on with sorting out the remaining errors on the D7 version. Is the module being upgraded to support the new Ooyala API in the next couple of days?

steingard’s picture

StatusFileSize
new3.87 KB

The latest error we are receiving is this "pcode, embedcode, signatures and expires are required". It occurs when the video has been uploaded and the user clicks "save". It is not clear wether they are doing this before or after Backlot has processed, but even after due time the video does not load-in.

Any assistance to bringing stability to this module in the next day would be greatly appreciated, since it needs to go live now and in this current state, it is not usable.

Mark detailed some errors/issues above for both APIs. We've been reminded by Ooyala that we should stick with the old APIs for now, so that is no longer a concern.

Thank you!

blakehall’s picture

Status: Needs review » Needs work
StatusFileSize
new7.43 KB

Here's a patch with a few more cleanup fixes, based on #10.

Local thumbnail behavior seems to be working.

NOTE: ooyala_api_upload_promo_image() is failing. The url in ooyala.api.inc that we're attempting to post thumbnails to (http://uploader.ooyala.com/api/upload/preview) is suddenly redirecting to the main site, which would explain why thumbnail uploading isn't working.

quicksketch’s picture

Thanks blakehall. Even over a year later many of these changes have not made their way into the project. The file handling is still a bit off though. We should be using file URIs everywhere, not file paths nor config_path(). I'm working on revising these changes to handle files properly.

quicksketch’s picture

Status: Needs work » Needs review
StatusFileSize
new9.26 KB

Here we are. I'm still a little unclear about the functionality of the ooyala_channels module, but this set of changes should keep data consistency for that module as well.

quicksketch’s picture

Status: Needs review » Fixed

I've applied this patch to the 7.x-2.x branch. At this point I'm not sure if we'll continue with the 1.x branch, considering Ooyala has already deprecated the 1.x API and plans to discontinue any backwards compatibility shortly. We should probably let 7.x-1.x die and move forward with the v2 API in 7.x-2.x.

Status: Fixed » Closed (fixed)

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