If Views Slideshow Galleria is already enabled and I enable Video module's Zencoder I receive this error:

Warning: Invalid argument supplied for foreach() in libraries_info() (line 340 of /Users/me/Sites/acquia-drupal/sites/all/modules/libraries/libraries.module)

I posted it in the Libraries API before finding this out. http://drupal.org/node/1529248

I have Galleria working great and love it. Can you suggest I do anything different with my settings? I'm confused who to consult at this point.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sgabe’s picture

What is this argument's value exactly when the error occurs?

calefilm’s picture

I'm sorry. Explain to a dummy what you mean...

The url is at http://localhost:8082/admin/config/media/video/transcoders

and the code snippet it was referring to is:

Libraries API (7.x-2.0-alpha2)
foreach (module_invoke($module, 'libraries_info') as $machine_name => $properties) {


function &libraries_info($name = NULL) {
  // This static cache is re-used by libraries_detect() to save memory.
  $libraries = &drupal_static(__FUNCTION__);

  if (!isset($libraries)) {
    $libraries = array();
    // Gather information from hook_libraries_info().
    foreach (module_implements('libraries_info') as $module) {
    foreach (module_invoke($module, 'libraries_info') as $machine_name => $properties) { 
        $properties['module'] = $module;
        $libraries[$machine_name] = $properties;
      }

Quick Note: I'm not going to be using this module - I actually prefer to use Views Slideshow for the purposes I need. Not to say I wouldn't use this module but I just don't need it at this time :) So if I can be of assistance I will help. Otherwise, I don't need any patches or fixes at this time.

calefilm’s picture

You may also reference progress made over here (Video module): http://drupal.org/node/1529224

Jorrit’s picture

Status: Active » Needs review
FileSize
314 bytes

views_slideshow_galleria_libraries_info() is missing a return statement. Add the following code at the end of views_slideshow_galleria_libraries_info() { ... } in views_slideshow_galleria.module to fix this problem:

return $libraries;

Patch attached.

sgabe’s picture

Title: Views Slideshow Galleria and Zencoder don't work together » Wrong implementation of hook_libraries_info()
Status: Needs review » Needs work

As I see this will need more work. The implementation of hook_libraries_info() in the 6.x branch seems unnecessary since the Libraries 2.x API is only available on Drupal 7, on the other hand in the 7.x branch the implementation seems to be deficient (at least) according to libraries.api.php.

Jorrit’s picture

I have not investigated that, I just looked at what I had to add to make the error go away.

sgabe’s picture

Status: Needs work » Fixed
FileSize
715 bytes

Let's just simply remove this hook for now. We can add Libraries API 2.x support later when it's stable. Change committed to both branches.

Jorrit’s picture

Thanks for your quick responses.

Status: Fixed » Closed (fixed)

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