From c3485ff34a3661dd9654b67118ac3f07a759e008 Mon Sep 17 00:00:00 2001 From: Eric Beliveau Date: Wed, 23 Jul 2025 21:31:22 -0400 Subject: [PATCH] fix(login): Language selector is not working due to httponly cookie The login page is set to the default browser language, but it's impossible to change the language using the select a the bottom of the login page. The page reload back the previous language. The readCookie('language') returns null, the reason is that the cookie is set as HTTPonly and can not be read by javascript. The solution is to read the cookie via the tpl instead. closes #747 --- tpl/login.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tpl/login.tpl b/tpl/login.tpl index 99df0d74a..38c3479e4 100644 --- a/tpl/login.tpl +++ b/tpl/login.tpl @@ -160,7 +160,7 @@ window.location.href = url + $(this).val(); }); - var langCode = readCookie('{CookieKeys::LANGUAGE}'); + var langCode = '{$smarty.cookies.language|escape:"javascript"}'; if (!langCode) { langCode = (navigator.language + "").replace("-", "_").toLowerCase();