The superfish module installed just fine in my installation profile... but I had forgotten to include the superfish library, so it shouldn't have. I dug around a bit to try and see if I could figure out what was going on, but I'm afraid I couldn't find the answer. I think that this issue: #1314616: drush site-install fails installing a profile which depends on superfish might be related, but apparently it's fixed.

My suspicion is that the problem is in the superfish_requirements function in the install file.

Comments

penyaskito’s picture

Not sure if related, but I had the opposite. The profile builds correctly the site, superfish is working, but I get a warning in the status report.

Superfish library was installed in profiles/myprofile/libraries, so it should have not been reported as a problem.

mehrpadin’s picture

Hey there,

Thank you both, I guess these are related http://drupal.org/node/1506480 & http://drupal.org/node/1215376 please give their dev a try and let me know the results, I'm doing my best to save as much time as possible, thanks again.

penyaskito’s picture

Assigned: Unassigned » penyaskito
graker’s picture

Superfish does have an issue with hook_requirements() implementation. The issue is that in that implementation the $requirements array is only returned in one of if/else branch. But it should return an array anyway, if not, php error will happen when you install superfish with a profile. So, adding (or moving) "return $requirements;" code to the very end of hook's implementation fixes the issue. I just checked it with my profile and it works.

mehrpadin’s picture

Privet Roman,

Upgrade to v1.9-beta4 :)

graker’s picture

privet :)

I certainly will upgrade to v1.9 as soon as it will be available to drush or to Drupal GUI module update. For now, I've disabled hook_requirements implementation in my profile.

greg.1.anderson’s picture

Status: Active » Needs review
StatusFileSize
new917 bytes

Although 7.x-1.9-beta4 did work for me from an installation profile, superfish's hook_requirements is all the same not quite correct. Since the libraries module is listed in the dependencies of superfish.info, it is not necessary or correct to test for it in hook requirements. See:

http://api.drupal.org/api/drupal/modules!system!system.api.php/function/...

Module dependencies do not belong to these installation requirements, but should be defined in the module's .info file.

greg.1.anderson’s picture

As a postscript, I will note that in the patch above, it may seem odd that module_exists('libraries') is still being called, when ostensibly, we are relying on our .info file to confirm this requirement. However, when hook_requirements is called from an installation profile, module_list will return only 'system' and 'user', so the module_exists above effectively guards libraries_get_libraries() from being called (which is good, because it is not loaded at this point).

mehrpadin’s picture

Hey Greg,

Thanks a lot, added to my to-do :)

mehrpadin’s picture

Status: Needs review » Fixed

Fixed! first tried to fix it by changing install to runtime but later decided to remove Libraries API dependency altogether (though still highly recommended). Please try the development release and let me know if everything is working as expected, thanks for everything everybody!

Status: Fixed » Closed (fixed)

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

brunodbo’s picture

Version: 7.x-1.9-beta4 » 7.x-1.9-beta5
Status: Closed (fixed) » Needs review

Right now, if you have all your modules and libraries in /profiles/
, Superfish' hook_requirements() will always report the library isn't installed, even when it's present in /profiles/
/libraries. Attached patch adds a check to see if superfish.js can be found in that location.

brunodbo’s picture

Patch attached.

mehrpadin’s picture

Status: Needs review » Fixed

Hey there,

Right on time! :) fixed now, thanks a lot!

Status: Fixed » Closed (fixed)

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