Problem/Motivation

The Libraries API module (https://www.drupal.org/project/libraries) manages libraries hierarchically (e.g., drupal-folder/libraries at the site root, drupal-folder/sites/all/libraries, drupal-folder/sites/default/libraries, or drupal-folder/sites/mysite.com/libraries).
This functionality is useful for multisite installations and other specific scenarios.

Steps to reproduce

Install the Clientside Validation module.

Place a validation library in any of the hierarchical library directories managed by the Libraries API, for example:
- drupal-folder/sites/all/libraries
- drupal-folder/sites/default/libraries
- drupal-folder/sites/mysite.com/libraries

Open the module’s configuration page, disable the “Use CDN” option, and save the settings.
Attempt to submit a form that relies on the library. The submission fails because the module cannot locate the locally‑stored library.

Proposed resolution

Refactor the module’s code so that it queries the Libraries API to locate and load local libraries. This will allow the validation scripts to be discovered regardless of which hierarchical directory they reside in.

Remaining tasks

Community review and feedback.
Comprehensive testing across single‑site and multisite installations.

User interface changes

No UI changes are required; the integration will work transparently to the end‑user.

API changes

-

Data model changes

-

Comments

gerson.analista created an issue. See original summary.

gerson.analista’s picture

Version: 4.1.2 » 4.0.x-dev
StatusFileSize
new5.81 KB

I created an initial patch to implement the integration, ran a few local tests, and it appears to work, but I believe the code can still be improved.

gerson.analista’s picture

Title: Integration with the Libraries API » Integration with Libraries API
gerson.analista’s picture

Status: Active » Needs review