Closed (won't fix)
Project:
ALTCHA
Version:
1.0.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
17 Oct 2025 at 09:20 UTC
Updated:
1 Jul 2026 at 11:42 UTC
Jump to comment: Most recent
Currently, the external ALTCHA javascript files are committed directly into the module’s repository under /assets/vendor. This approach makes it difficult to:
Move the ALTCHA javascript dependencies to be managed via the composer libraries system, using a composer.json repository entry in the module.
{
"require": {
"altcha/altcha": "^1.0"
},
"repositories": [
{
"type": "package",
"package": {
"name": "altcha/altcha",
"version": "1.0.0",
"type": "drupal-library",
"dist": {
"url": "https://cdn.jsdelivr.net/npm/altcha@1.0.0/dist/",
"type": "zip"
}
}
}
]
}
Comments
Comment #2
filsterjisah commentedComment #3
anybodyBig +1! Definitely shouldn't be included. Maybe you could take a look at similiar third party js integration modules for best practices. Status report should be used to report if the library is missing. Should never be loaded from external by default (GDPR).
Comment #4
robindh commentedWe did think about this when we originally released the module, since I agree it's not ideal to include the third party script in the module itself. The main reason why we chose this approach is to make it work out of the box for Drupal CMS. The alternative would be to load it by default via CDN - but this is even worse because of possible CSP issues and as you mentioned: GDPR. Webform's approach to this is to include a
webform:libraries:downloaddrush command, which is convenient for standard drupal sites - but not for Drupal CMS as far as I'm aware.We did include the ability to override the ALTCHA library via the settings form; this way sites can choose to use a composer-required dependency or CDN URL if they wish to do so.
I'm going to close this one as a won't fix, but feel free to re-open if there's a better solution for this that would also work out of the box for Drupal CMS.