Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

Remove app.html layout from error templates (#6165)

Uku Tahtb498aeb07a87
diff --git a/lib/plausible_web/controllers/helpers.ex b/lib/plausible_web/controllers/helpers.ex
index e66e91c554..a8ab6922f1 100644
--- a/lib/plausible_web/controllers/helpers.ex
+++ b/lib/plausible_web/controllers/helpers.ex
@@ -4,6 +4,7 @@ defmodule PlausibleWeb.ControllerHelpers do
def render_error(conn, status, message) do
conn
+ |> put_root_layout(false)
|> put_status(status)
|> put_view(PlausibleWeb.ErrorView)
|> render("#{status}.html", message: message, layout: error_layout())
@@ -11,6 +12,7 @@ defmodule PlausibleWeb.ControllerHelpers do
def render_error(conn, status) do
conn
+ |> put_root_layout(false)
|> put_status(status)
|> put_view(PlausibleWeb.ErrorView)
|> render("#{status}.html", layout: error_layout())