Erreur page contact

Hello,

je pense que c’est depuis la MàJ d’hier ?
La page de contact ne fonctionne plus et renvoi un code erreur 417 :

Traceback (most recent call last):
  File "apps/frappe/frappe/utils/jinja.py", line 104, in render_template
    return get_jenv().from_string(template).render(context)
  File "env/lib/python3.10/site-packages/jinja2/environment.py", line 1105, in from_string
    return cls.from_code(self, self.compile(source), gs, None)
  File "env/lib/python3.10/site-packages/jinja2/environment.py", line 768, in compile
    self.handle_exception(source=source_hint)
  File "env/lib/python3.10/site-packages/jinja2/environment.py", line 936, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "<unknown>", line 40, in template
jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'endif'. Jinja was looking for the following tags: 'endblock'. The innermost block that needs to be closed is 'block'.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "apps/frappe/frappe/website/serve.py", line 20, in get_response
    response = renderer_instance.render()
  File "apps/frappe/frappe/website/page_renderers/template_page.py", line 84, in render
    html = self.get_html()
  File "apps/frappe/frappe/website/utils.py", line 550, in cache_html_decorator
    html = func(*args, **kwargs)
  File "apps/frappe/frappe/website/page_renderers/template_page.py", line 101, in get_html
    html = self.render_template()
  File "apps/frappe/frappe/website/page_renderers/template_page.py", line 237, in render_template
    html = frappe.render_template(self.source, self.context, safe_render=safe_render)
  File "apps/frappe/frappe/utils/jinja.py", line 106, in render_template
    throw(
  File "apps/frappe/frappe/__init__.py", line 630, in throw
    msgprint(
  File "apps/frappe/frappe/__init__.py", line 602, in msgprint
    _raise_exception()
  File "apps/frappe/frappe/__init__.py", line 550, in _raise_exception
    raise exc
frappe.exceptions.ValidationError: <pre>{% extends "templates/web.html" %}

{% set title = heading or _("Contact Us") %}
{% block header %}<h1>{{ heading or _("Contact Us") }}</h1>{% endblock %}

{% block page_content %}
<style>
	.address {
		line-height: 1.7em;
	}
	.form-control {
		border-style: solid;
		border-radius: 4px;
	}
	.page-header h1 {
		margin-top: 1rem;
	}
</style>
<div class="contact-content">
	{% if introduction %}
	<div>
		{{ introduction or "" }}<br>
	</div>
	{% endif %}
	<div class="row">
		<div class="col-md-8">
			<p id="contact-alert" class="alert alert-warning"
				style="display: none;"> </p>
			{% if query_options -%}
			<div class="form-group">
				<select name="subject" class="form-control">
					{% for option in query_options.split("\n") -%}
					<option value="{{ option }}">{{ _(option) }}</option>
					{%- endfor %}
				{% else %}
					<option value="General">{{ _("General") }}</option>
				{% endif %}
				</select>
			</div>
			{% endif %}
			<div class="form-group">
				<input class="form-control" name="email" type="text"
				placeholder="{{ _('Your email address') }}" />
			</div>
			<div class="form-group">
				<textarea rows="10" name="message" class="form-control" placeholder="{{ _('Your message') }}"></textarea>
			</div>
			<div class="form-group">
				<button class="btn btn-primary btn-send">{{ _("Send") }}</button>
			</div>
		</div>
		{% if address_title %}
		<div class="col-md-3 col-md-offset-1 address"
				itemscope itemtype="http://schema.org/PostalAddress">
			<h4 style="margin-top: 0px;"><i class="uil uil-map-pin"></i> {{ address_title }}</h4>
			{% if address_line1 %}
				<span itemprop="streetAddress">{{ address_line1 }}</span><br>
			{% endif %}
			{% if address_line2 %}
				<span itemprop="streetAddress">{{ address_line2 }}</span><br>
			{% endif %}
			{% if city %}
				<span itemprop="addressLocality">{{ city }}</span><br>
			{% endif %}
			{% if state %}
				<span itemprop="addressRegion">{{ state }}</span><br>
			{% endif %}
			{% if pincode %}
				<span itemprop="postalCode">{{ pincode }}</span><br>
			{% endif %}
			{% if country %}
				<span itemprop="addressCountry">{{ country }}</span><br><br>
			{% endif %}
			{% if phone %}
				<i class='uil uil-phone-alt'></i> <span itemprop="telephone">{{ phone }}</span><br>
			{% endif %}
			{% if email_id %}
				<i class='uil uil-envelope-alt'></i>
				<span itemprop="email">
					<a href="mailto:{{ email_id }}">{{ email_id }}</a>
				</span>
				<br>
			{% endif %}
			{% if skype %}
				<i class='uil uil-skype-alt'></i> <span itemprop="email">{{ skype }}</span><br>
			{% endif %}

		</div>
		{% endif %}
	</div>
</div>
<script>
	{% include "templates/includes/contact.js" %}
</script>
{% endblock %}
</pre><pre>Traceback (most recent call last):
  File "apps/frappe/frappe/utils/jinja.py", line 104, in render_template
    return get_jenv().from_string(template).render(context)
  File "env/lib/python3.10/site-packages/jinja2/environment.py", line 1105, in from_string
    return cls.from_code(self, self.compile(source), gs, None)
  File "env/lib/python3.10/site-packages/jinja2/environment.py", line 768, in compile
    self.handle_exception(source=source_hint)
  File "env/lib/python3.10/site-packages/jinja2/environment.py", line 936, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "<unknown>", line 40, in template
jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'endif'. Jinja was looking for the following tags: 'endblock'. The innermost block that needs to be closed is 'block'.
</pre>
1 « J'aime »

Bonjour @nathan_EcoCentre,

Effectivement… :slightly_frowning_face: On passe un correctif dans la soirée.
Merci d’avoir remonté ce bug.

Bonne fin de journée !

2 « J'aime »

Super merci ! :+1:

Et de rien !