Skip to content

Riddler: fix undefined CAPTCHA_DEFAULT_VALIDATION_* constant - #450

Merged
miromichalicka merged 1 commit into
developfrom
claude/riddler-captcha-constant-error-55a47f
Oct 23, 2026
Merged

miromichalicka merged 1 commit into
developfrom
claude/riddler-captcha-constant-error-55a47f

Conversation

@miromichalicka

Copy link
Copy Markdown
Member

Problem

Dev logs show a fatal error whenever a riddle CAPTCHA is submitted:

Error: Undefined constant "CAPTCHA_DEFAULT_VALIDATION_CASE_SENSITIVE" in riddler_captcha_validate() (line 86 of modules/contrib/riddler/riddler.module)

riddler 2.0.2 still uses the old global constants, but captcha 1.17 only defines them as Drupal\captcha\Constants\CaptchaConstants.

Fix

Add a local patch (patches/riddler-captcha-constants.patch) that imports CaptchaConstants and uses it in the two case labels. This is the same change upstream made in riddler 2.0.5.

We can't just upgrade riddler: 2.0.3–2.0.5 declare core ^8.9 || ^9, and 3.x needs captcha ^2. Upgrading to captcha 2.x and riddler 3.x would make the patch unnecessary; that's left for a separate change.

composer.lock: only the content-hash changed (composer update --lock, no package changes).

Testing

  • Patch applies cleanly (patch -p1) to a fresh riddler 2.0.2 tarball
  • php -l passes on the patched file
  • Not yet verified on dev: submit a form with the riddle CAPTCHA after deploy

🤖 Generated with Claude Code

riddler 2.0.2 still references the global CAPTCHA_DEFAULT_VALIDATION_*
constants in riddler_captcha_validate(). captcha 1.17 only provides them
as Drupal\captcha\Constants\CaptchaConstants, so every riddle answer
submission fatals on dev. Backport the upstream fix from riddler 2.0.5
as a local patch; 2.0.5 itself declares core ^8.9 || ^9 and riddler 3.x
needs captcha ^2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@miromichalicka
miromichalicka merged commit 753f25f into develop Oct 23, 2026
4 checks passed
@miromichalicka
miromichalicka deleted the claude/riddler-captcha-constant-error-55a47f branch October 23, 2026 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant