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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tenken’s picture

Attaching 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.

tenken’s picture

evil file uploader widget .... oops.

Simon Georges’s picture

Status: Active » Needs review

Changing status, as there is a patch.

corey.aufang’s picture

Status: Needs review » Closed (works as designed)

LESS 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.

K3vin_nl’s picture

This 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 :-)

corey.aufang’s picture

Status: Closed (works as designed) » Fixed

Since 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

Status: Fixed » Closed (fixed)

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

  • Commit 98c4042 on 7.x-3.x, 7.x-4.x by corey.aufang:
    Issue #1841898 by tenken: Added dependency of Libraries API module.