From 319f4cb270a358537850a88fef42065c02724d5f Mon Sep 17 00:00:00 2001 From: --global Date: Fri, 23 May 2014 10:23:13 +0200 Subject: [PATCH 1/2] [FIX] website: define languages variable outside of an 'if' as it is used below in the same template, leading to a crash due to the variable not always being defined. --- addons/website/views/website_templates.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website/views/website_templates.xml b/addons/website/views/website_templates.xml index decc6d5618b..d5aebd4c686 100644 --- a/addons/website/views/website_templates.xml +++ b/addons/website/views/website_templates.xml @@ -80,8 +80,8 @@ and main_object.website_meta_keywords or website_meta_keywords"/> <t t-esc="title"/> + - From 62c0f6bf118264e70b99db371d45d2d515780817 Mon Sep 17 00:00:00 2001 From: --global Date: Fri, 23 May 2014 10:39:26 +0200 Subject: [PATCH 2/2] [FIX] website: ir_http: when rerouting url containing default language -> url without language, the ? was missing, leading to wrong urls. --- addons/website/models/ir_http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website/models/ir_http.py b/addons/website/models/ir_http.py index 57e7d284922..360b34c877c 100644 --- a/addons/website/models/ir_http.py +++ b/addons/website/models/ir_http.py @@ -72,7 +72,7 @@ class ir_http(orm.AbstractModel): if request.lang == request.website.default_lang_code: # If language is in the url and it is the default language, redirect # to url without language so google doesn't see duplicate content - return request.redirect(path + request.httprequest.query_string) + return request.redirect(path + '?' + request.httprequest.query_string) return self.reroute(path) return self._handle_exception(code=404) return super(ir_http, self)._dispatch()