From 01cad11472775ed5babd278849138c404e26c3af Mon Sep 17 00:00:00 2001 From: chris Date: Fri, 12 Jun 2026 10:44:05 -0400 Subject: [PATCH] Fix ALTCHA widget not loading or submitting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two bugs prevented form submission entirely: 1. `challengeurl` attribute was renamed to `challenge` in altcha v3 — the widget silently ignored the old name so it never fetched a challenge. 2. `altchaWidget.value` is not an exposed property on the v3 custom element; read the solved payload from the hidden `` the widget renders in light DOM instead. Also clears the err-altcha error message at the start of each submit attempt so it doesn't linger after the user completes verification and retries. Co-Authored-By: Claude Sonnet 4.6 --- main-site/contact-form.js | 12 +++++++----- main-site/contact/index.html | 2 +- main-site/index.html | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/main-site/contact-form.js b/main-site/contact-form.js index 5cfb022..7f04624 100644 --- a/main-site/contact-form.js +++ b/main-site/contact-form.js @@ -141,13 +141,15 @@ return; } - const altchaWidget = form.querySelector('altcha-widget'); - const altchaValue = altchaWidget ? altchaWidget.value : ''; + const errAltcha = document.getElementById('err-altcha'); + if (errAltcha) errAltcha.style.display = 'none'; + + const altchaInput = form.querySelector('[name="altcha"]'); + const altchaValue = altchaInput?.value || ''; if (!altchaValue) { - const errEl = document.getElementById('err-altcha'); - if (errEl) { errEl.style.display = ''; } + if (errAltcha) errAltcha.style.display = ''; showAlert('Please complete the verification.', 'is-warning'); - altchaWidget && altchaWidget.scrollIntoView({ behavior: 'smooth', block: 'center' }); + form.querySelector('altcha-widget')?.scrollIntoView({ behavior: 'smooth', block: 'center' }); return; } diff --git a/main-site/contact/index.html b/main-site/contact/index.html index 3107073..adb28b7 100644 --- a/main-site/contact/index.html +++ b/main-site/contact/index.html @@ -145,7 +145,7 @@
diff --git a/main-site/index.html b/main-site/index.html index a3046d6..55b0e54 100644 --- a/main-site/index.html +++ b/main-site/index.html @@ -220,7 +220,7 @@