Because when I install the module as part of my drupal distribution I am building, I get to the 'Verifying requirements' phase of the installer and get this error there:

"Superfish module requires the Libraries module to be installed."

However, my libraries & superfish libraries are all installed fine.

After researching a bit and looking into the documentation at http://api.drupal.org/api/drupal/developer--hooks--install.php/function/... it seems like 'module_exists()' should not be used to check for the libraries module. 'Install-time requirements must be checked without access to the full Drupal API, because it is not available during install.php'

I think we should manually scan the relevant directories like libraries_get_libraries() does - see http://api.acquia.com/api/open_atrium/profiles--openatrium--modules--con....

Comments

girishmuraly’s picture

Status: Active » Needs review
StatusFileSize
new1.12 KB

I think drupal_get_path() will do the job. Thats what is used in drupal_install_system() anyway. So, using the same here. Patch attached.

girishmuraly’s picture

rickvug’s picture

The patch applies for me and fixes the problem. I do wonder why this check is needed as superfish has a dependency on libraries, which should stop module installation in the first place. Changing "install" to "runtime" also fixes the problem.

pillarsdotnet’s picture

The check is needed for people who are upgrading from a version that did not have the dependency on libraries.

samhassell’s picture

Status: Needs review » Reviewed & tested by the community

patch works with current dev. I'm also using superfish in an install profile.

Setting to RTBC, if no one minds :)

mehrpadin’s picture

Status: Reviewed & tested by the community » Fixed

Hey there,

Thanks to all, fixed as of v1.9-beta3 :)

Status: Fixed » Closed (fixed)

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

mehrpadin’s picture

Update: Changed hook_requirements completely; Libraries API is no longer mandatory, therefore no check and so on. Please try the development release.

jarrodirwin’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new561 bytes

This is still an issue with the latest dev release (commit on 2012-10-27) when installing with an install profile.

I have created a patch based off that in #1 which lets us get past this.

mehrpadin’s picture

My bad, try the dev, just updated, let me know if it's any better, thanks!

oenie’s picture

Status: Needs review » Fixed

Fix in the latest version does the trick for me, code looks ok (similar to other plugin-related modules i have checked)
Tested in a build with an install profile.

Status: Fixed » Closed (fixed)

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