You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Version: 2023.10
I created the email-templates volume then dropped 'custom-email-template.html' containing the exact code from the example here: Template Page
To Reproduce
See above
Expected behavior
An email is sent using the template
Logs
Stacktrace from authentik
Traceback (most recent call last):
File "/authentik/flows/views/executor.py", line 287, in get
stage_response = self.current_stage_view.dispatch(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ak-root/venv/lib/python3.11/site-packages/django/views/generic/base.py", line 143, in dispatch
return handler(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/authentik/stages/email/stage.py", line 139, in get
self.send_email()
File "/authentik/stages/email/stage.py", line 107, in send_email
message = TemplateEmailMessage(
^^^^^^^^^^^^^^^^^^^^^
File "/authentik/stages/email/utils.py", line 28, in __init__
html_content = render_to_string(template_name, template_context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ak-root/venv/lib/python3.11/site-packages/django/template/loader.py", line 61, in render_to_string
template = get_template(template_name, using=using)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ak-root/venv/lib/python3.11/site-packages/django/template/loader.py", line 15, in get_template
return engine.get_template(template_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ak-root/venv/lib/python3.11/site-packages/django/template/backends/django.py", line 33, in get_template
return Template(self.engine.get_template(template_name), self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ak-root/venv/lib/python3.11/site-packages/django/template/engine.py", line 175, in get_template
template, origin = self.find_template(template_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ak-root/venv/lib/python3.11/site-packages/django/template/engine.py", line 157, in find_template
template = loader.get_template(name, skip=skip)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ak-root/venv/lib/python3.11/site-packages/django/template/loaders/cached.py", line 57, in get_template
template = super().get_template(template_name, skip)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ak-root/venv/lib/python3.11/site-packages/django/template/loaders/base.py", line 28, in get_template
return Template(
^^^^^^^^^
File "/ak-root/venv/lib/python3.11/site-packages/django/template/base.py", line 154, in __init__
self.nodelist = self.compile_nodelist()
^^^^^^^^^^^^^^^^^^^^^^^
File "/ak-root/venv/lib/python3.11/site-packages/django/template/base.py", line 200, in compile_nodelist
return parser.parse()
^^^^^^^^^^^^^^
File "/ak-root/venv/lib/python3.11/site-packages/django/template/base.py", line 513, in parse
raise self.error(token, e)
File "/ak-root/venv/lib/python3.11/site-packages/django/template/base.py", line 511, in parse
compiled_result = compile_func(self, token)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ak-root/venv/lib/python3.11/site-packages/django/templatetags/i18n.py", line 581, in do_block_translate
raise TemplateSyntaxError(
django.template.exceptions.TemplateSyntaxError: 'blocktrans' doesn't allow other block tags (seen 'blocktrans') inside it
Python Traceback
django.template.exceptions.TemplateSyntaxError: 'blocktrans' doesn't allow other block tags (seen 'blocktrans') inside it
Show less
Context
{
"message": "Traceback (most recent call last):\n File \"/authentik/flows/views/executor.py\", line 287, in get\n stage_response = self.current_stage_view.dispatch(request)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/ak-root/venv/lib/python3.11/site-packages/django/views/generic/base.py\", line 143, in dispatch\n return handler(request, *args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/authentik/stages/email/stage.py\", line 139, in get\n self.send_email()\n File \"/authentik/stages/email/stage.py\", line 107, in send_email\n message = TemplateEmailMessage(\n ^^^^^^^^^^^^^^^^^^^^^\n File \"/authentik/stages/email/utils.py\", line 28, in __init__\n html_content = render_to_string(template_name, template_context)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/ak-root/venv/lib/python3.11/site-packages/django/template/loader.py\", line 61, in render_to_string\n template = get_template(template_name, using=using)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/ak-root/venv/lib/python3.11/site-packages/django/template/loader.py\", line 15, in get_template\n return engine.get_template(template_name)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/ak-root/venv/lib/python3.11/site-packages/django/template/backends/django.py\", line 33, in get_template\n return Template(self.engine.get_template(template_name), self)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/ak-root/venv/lib/python3.11/site-packages/django/template/engine.py\", line 175, in get_template\n template, origin = self.find_template(template_name)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/ak-root/venv/lib/python3.11/site-packages/django/template/engine.py\", line 157, in find_template\n template = loader.get_template(name, skip=skip)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/ak-root/venv/lib/python3.11/site-packages/django/template/loaders/cached.py\", line 57, in get_template\n template = super().get_template(template_name, skip)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/ak-root/venv/lib/python3.11/site-packages/django/template/loaders/base.py\", line 28, in get_template\n return Template(\n ^^^^^^^^^\n File \"/ak-root/venv/lib/python3.11/site-packages/django/template/base.py\", line 154, in __init__\n self.nodelist = self.compile_nodelist()\n ^^^^^^^^^^^^^^^^^^^^^^^\n File \"/ak-root/venv/lib/python3.11/site-packages/django/template/base.py\", line 200, in compile_nodelist\n return parser.parse()\n ^^^^^^^^^^^^^^\n File \"/ak-root/venv/lib/python3.11/site-packages/django/template/base.py\", line 513, in parse\n raise self.error(token, e)\n File \"/ak-root/venv/lib/python3.11/site-packages/django/template/base.py\", line 511, in parse\n compiled_result = compile_func(self, token)\n ^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/ak-root/venv/lib/python3.11/site-packages/django/templatetags/i18n.py\", line 581, in do_block_translate\n raise TemplateSyntaxError(\ndjango.template.exceptions.TemplateSyntaxError: 'blocktrans' doesn't allow other block tags (seen 'blocktrans') inside it",
"http_request": {
"args": {
"next": "/"
},
"path": "/api/v3/flows/executor/password-recovery/",
"method": "GET"
}
}
User
{
"pk": 1,
"email": "",
"username": "AnonymousUser"
}
Version and Deployment (please complete the following information):
authentik version: 2023.10.4
Deployment: [e.g. docker-compose, helm]
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
sgtslaughta
changed the title
GET /api/v3/flows/executor/password-recovery/
Custom Email Template raises exception, not sent; GET /api/v3/flows/executor/password-recovery/
Dec 1, 2023
Describe the bug
Version: 2023.10
I created the
email-templates
volume then dropped 'custom-email-template.html' containing the exact code from the example here: Template PageTo Reproduce
See above
Expected behavior
An email is sent using the template
Logs
Stacktrace from authentik
Python Traceback
Version and Deployment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: