The Less module in any version uses the Libraries module to devine where the lessc.inc.php file is located.
If this module is not installed in 2.x drupal simply says Less cannot be found -- which is not as helpful as it could be.
Other modules such as WYSIWYG for instance tell a user to use /sites/all/libraries
as the destination directory to install wysiwyg editors within. This leads to ambiguity when a developer has a libraries folder already on their site and drops lessphp into that folder. But, Less still cannot see it because the Libraries module is not downloaded or enabled.
By simply adding a dependency line to the info file drupal will notify the site administrator this module depends on the Libraries API (if not found) ... and the module will install/work more simply for a broader user base.
Comment | File | Size | Author |
---|---|---|---|
#2 | less-fix_missing_libraries_dependency_for_easier_install-1841898-1.patch | 259 bytes | tenken |
Comments
Comment #1
tenken CreditAttribution: tenken commentedAttaching a patch against head to be backported. This should not affect any logic by Less, its simply a change to make installation less confusing for some users.
Comment #2
tenken CreditAttribution: tenken commentedevil file uploader widget .... oops.
Comment #3
Simon Georges CreditAttribution: Simon Georges commentedChanging status, as there is a patch.
Comment #4
corey.aufang CreditAttribution: corey.aufang commentedLESS does not require the Libraries module to function. It only requires the Libraries module to function if you have lessphp in the libraries directory.
Since lessphp can be included using Composer or still exist in the legacy location, I chose not to have Libraries marked as a dependency.
You can look here to see what the module does: http://drupalcode.org/project/less.git/blob/56aea2d421c2a418062dc0eaf4d7...
It first checks for a Composer path, then the Libraries path, and then finally the legacy path, in that order.
First file discovered is assumed to be correct and included.
If the only location that lessphp could exist was in the Libraries path, I would agree with you can mark Libraries as a dependency.
Comment #5
K3vin_nl CreditAttribution: K3vin_nl commentedThis just caused me 10 minutes of head scratching, until I discovered I hadn't installed the libraries module, so I agree that an error message might have been useful :-)
Comment #6
corey.aufang CreditAttribution: corey.aufang commentedSince things in v3 have changed so much, I've been rethinking and am going to include this.
With a forced minimum lessphp version now 3.7, it wouldn't be out of scope to require that users also install the Libraries API module.
http://drupalcode.org/project/less.git/commit/98c4042