Closed (fixed)
Project:
ALTCHA
Version:
1.0.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
12 May 2026 at 12:22 UTC
Updated:
30 Jul 2026 at 11:50 UTC
Jump to comment: Most recent
Currently the shipped minfied js in "assets/vendor/altcha" is still using Altcha v2, but Altcha v3 is the latest version.
See https://altcha.org/docs/v2/migration/widget-v2 on how to migrate from v3 to v2.
Thanks for the wonderful module!
Additionally I'd vote to add a new 3.x branch (skipping 2.x) for altcha v3 to sync the Drupal module version with the library like other modules do. That's quite intuitive.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
anybodyComment #3
anybodyComment #5
harjyottkaurr commentedComment #7
harjyottkaurr commentedThis MR adds support for Altcha v3.
Comment #8
anybodyThe settings changes in the .module file will need an update hook or logics to be compatible with both versions. What's the maintainers branch plan?
Comment #9
akshay kashyap commentedI ran this MR locally and checked it against the
Altcha v3migration guide.The widget uses the new v3 attributes now. For example,
“challengeurl”is gone—now it’s just“challenge.”The oldfloating_modesetting gets mapped to the new display values(floating, floating-top, and floating-bottom)before rendering, so that part lines up with v3’s requirements.I also followed up on the concern in #8 about an update hook. At first, I thought we might need one too. But after testing the upgrade path, I’m honestly not seeing the need. I tried upgrading with an existing config
(floating_enabled, floating_mode, floating_offset),applied the MR, cleared caches, and made sure the widget still worked. The config keys themselves haven’t changed—it’s just the way they’re translated for the Altcha v3 widget at runtime that’s different. So, I don’t see any configuration that actually needs migrating.The only scenario I can think of where an update hook would matter is if the module added new config keys or changed the config schema (like replacing
floating_modewith a newdisplay_mode setting). This MR doesn’t do that.The last thing I’d recommend before making this RTBC is to check all remaining widget attributes against the Altcha v3 migration guide. Just make sure we aren’t missing any v2-specific attributes that need updating. Other than that, the runtime mapping looks solid. I didn’t find any config that needs migration.
Comment #10
akshay kashyap commentedComment #11
robindh commentedThanks for the initial work on this! I've synced with the other maintainers about the widget v2 > v3 upgrade path.
Our current plan is to leave the 1.x branch as-is, and create a new 2.x branch which will contain ALTCHA v3 widget support.
Main reason for a new major version release is the breaking change mentioned in the ALTCHA docs:
This might cause some regression for sites that have overridden widget styling.
We're not planning on skipping 2.x and creating a 3.x branch, mostly because we're using 2 different ALTCHA libraries that don't use synced versioning anyway:
- ALTCHA PHP library (will be v2)
- ALTCHA JS library (will be v3)
In the following days, I'll review the merge request and will probably add more support for some of the new features of the v3 widget
Comment #12
robindh commentedChanges to the merge request since my last comment:
- Added requirement for the ALTCHA PHP v2 library
- Switched to the newer ALTCHA v2 algorithm as recommended by the docs
- Added support for widget themes
- Added support for additional widget modes (bar, overlay, ..)
- Added support for additional checkbox types (native, toggle)
- Added i18n compatibility based on the current 1.x branch
- Provided a migration path from v1 to v2
Also created a 2.x branch because of the breaking change
Comment #13
arno_vghI've reviewed the changes and noticed a few small issues:
challengeUrlproperty instead ofchallenge.barPlacementconfiguration. From the docs: "barPlacement: Vertical position of the widget when display is set to bar ('bottom' or 'top’)".Comment #14
arno_vghComment #15
robindh commentedThanks, I've processed the feedback:
challengeattributebarPlacementwidget configuration optionFor the example custom theme implementation, we can create a documentation page after the first 2.x release
Comment #17
robindh commentedThanks for the efforts on this issue! Merged into 2.x - will create a first dev release now.
After the upgrade path has been documented, I'll create the first 2.x beta / RC.