[FIX] http_routing: hide the traceback by default on error 500 page
Before this commit, the error 500 page would always shows the full traceback even if it is supposed to only show it in debug mode (or if editable). That behavior was probably broken by the debug refactoring [1], which introduced side effect with [2] (see template `http_error` which was moved with [3]). [1]: https://github.com/odoo/odoo/commit/d7cd97a9be63ae0a8643400b56d6f9a03285fba6 [2]: https://github.com/odoo/odoo/commit/24a20cd3fb00657da44d10a7a7d89cf94bdbdd83 [3]: https://github.com/odoo/odoo/commit/423402f1e50000186924186beba0cbe87e02e774 X-original-commit: 0d4e3001de81cc04cc6cc805edd75de19ce0255d Part-of: odoo/odoo#78065
This commit is contained in:
@@ -69,7 +69,7 @@
|
||||
<h1 class="mt-5">Oops! Something went wrong.</h1>
|
||||
<p>Take a look at the error message below.</p>
|
||||
</div>
|
||||
<t t-if="editable or request.session.debug">
|
||||
<t t-if="editable or debug">
|
||||
<t t-call="http_routing.http_error_debug"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
@@ -88,7 +88,7 @@
|
||||
<h1 class="mt-5">403: Forbidden</h1>
|
||||
<p>The page you were looking for could not be authorized.</p>
|
||||
</div>
|
||||
<t t-if="editable or request.session.debug">
|
||||
<t t-if="editable or debug">
|
||||
<t t-call="http_routing.http_error_debug"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
@@ -145,7 +145,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<title t-esc="status_message">Internal Server Error</title>
|
||||
<t t-set="debug" t-value="True"/>
|
||||
|
||||
<link rel="stylesheet" href="/web/static/lib/bootstrap/css/bootstrap.css"/>
|
||||
<script src="/web/static/lib/jquery/jquery.js" type="text/javascript"/>
|
||||
|
||||
@@ -2283,7 +2283,7 @@
|
||||
</xpath>
|
||||
<xpath expr="//div[@id='error_message']" position="after">
|
||||
<div class="container" t-if="view and editable">
|
||||
<div class="alert alert-danger" t-if="debug" role="alert">
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<h4>Template fallback</h4>
|
||||
<p>An error occured while rendering the template <code t-esc="qweb_exception.name"/>.</p>
|
||||
<p>If this error is caused by a change of yours in the templates, you have the possibility to reset the template to its <strong>factory settings</strong>.</p>
|
||||
|
||||
Reference in New Issue
Block a user