From 27c663a48a87a5a48902962b9ecdcaab55afb9f7 Mon Sep 17 00:00:00 2001 From: Jeremy Kersten Date: Thu, 24 Sep 2020 09:53:11 +0000 Subject: [PATCH] [FIX] website: edit master wrongly computed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In case you don't have the trailing slash and are on your homepage, the indexOf will return -1 and you will be redirectected to the pathname.substr(-1) Now if you don't have trailing slash in your url after position 1, we don't subtract anything. domain.com/fr_BE Before this commit: => redirect to domain.com/E After thi comit => redirect to domain.com task-2345490 closes odoo/odoo#58458 X-original-commit: ada2e2ce68dbc8b1df701691d9d3e958fef4ea31 Signed-off-by: Jérémy Kersten (jke) --- addons/website/static/src/js/menu/translate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website/static/src/js/menu/translate.js b/addons/website/static/src/js/menu/translate.js index be5a99532e4..afb2aff2dbf 100644 --- a/addons/website/static/src/js/menu/translate.js +++ b/addons/website/static/src/js/menu/translate.js @@ -50,7 +50,7 @@ var TranslatePageMenu = websiteNavbarData.WebsiteNavbarActionWidget.extend({ current.href = window.location.toString(); current.search += (current.search ? '&' : '?') + 'enable_editor=1'; // we are in translate mode, the pathname starts with '/