Closed (fixed)
Project:
Superfish Dropdown Menu
Version:
7.x-1.9-beta5
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
23 Mar 2012 at 19:03 UTC
Updated:
11 May 2013 at 09:50 UTC
Jump to comment: Most recent file
Comments
Comment #1
penyaskitoNot 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.
Comment #2
mehrpadin commentedHey 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.
Comment #3
penyaskitoComment #4
graker commentedSuperfish 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.
Comment #5
mehrpadin commentedPrivet Roman,
Upgrade to v1.9-beta4 :)
Comment #6
graker commentedprivet :)
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.
Comment #7
greg.1.anderson commentedAlthough 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/...
Comment #8
greg.1.anderson commentedAs 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).Comment #9
mehrpadin commentedHey Greg,
Thanks a lot, added to my to-do :)
Comment #10
mehrpadin commentedFixed! first tried to fix it by changing
installtoruntimebut 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!Comment #12
brunodboRight 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.
Comment #13
brunodboPatch attached.
Comment #14
mehrpadin commentedHey there,
Right on time! :) fixed now, thanks a lot!