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
-
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | integration-with-libraries-api-3549981-2.patch | 5.81 KB | gerson.analista |
Comments
Comment #2
gerson.analista commentedI 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.
Comment #3
gerson.analista commentedComment #4
gerson.analista commented