From dfda70dd8ea95e07487d3f2ac2b8d205fcc87b9a Mon Sep 17 00:00:00 2001 From: Quentin Gliech Date: Mon, 21 Sep 2026 22:09:46 +0200 Subject: [PATCH] Fix the CAPTCHA component failing to render because of an undefined translation function Macros close over the context of the template that imports them, at import time. Importing the CAPTCHA component from a child template ran before `base.html` defined `_`, so the noscript translation inside the macro failed with an undefined-not-callable error. Import it from `base.html` like every other component. --- templates/base.html | 1 + templates/pages/register/password.html | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/templates/base.html b/templates/base.html index 2113a34fd..f7ed20bb6 100644 --- a/templates/base.html +++ b/templates/base.html @@ -16,6 +16,7 @@ Please see LICENSE files in the repository root for full details. {% import "components/errors.html" as errors %} {% import "components/icon.html" as icon %} {% import "components/scope.html" as scope %} +{% import "components/captcha.html" as captcha %} diff --git a/templates/pages/register/password.html b/templates/pages/register/password.html index 08e71fe1e..d181d5428 100644 --- a/templates/pages/register/password.html +++ b/templates/pages/register/password.html @@ -9,8 +9,6 @@ Please see LICENSE files in the repository root for full details. {% extends "base.html" %} -{% import "components/captcha.html" as captcha %} - {% block content %}