summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRomain Derie <rde@odoo.com>2018-03-15 14:38:59 +0100
committerRomain Derie <rde@odoo.com>2018-03-15 15:03:34 +0100
commit2b5bb95d430a8cfb3f6abb982f7402c33cdcc313 (patch)
treeb1263b1adb44e20fa275fb97712da39873a4862d
parent16631338739c5cea1f7bc7abaea8c9a0f6f0790b (diff)
[FIX] website: make 'Optimize SEO' working again (for empty fields)
This commit https://github.com/odoo/odoo/commit/965f49201812cc3cca319a3b5b93331272dd2288 removed empty meta-description and meta-keywords from the DOM for SEO audit reasons (these tags when empty are considered as duplicates at a SEO point of view). By doing so it prevent the 'Optimize SEO' to work correctly since it can't retrieve the DOM elements that are used to store the user modifications until he saves. Now, even when these meta-tags are empty, we display them to people having the rights to 'Optimize SEO'. This closes #23659
-rw-r--r--addons/website/views/website_templates.xml4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/website/views/website_templates.xml b/addons/website/views/website_templates.xml
index 81a860ad21b..bcd6e5d5a97 100644
--- a/addons/website/views/website_templates.xml
+++ b/addons/website/views/website_templates.xml
@@ -110,8 +110,8 @@
and main_object.website_meta_description or website_meta_description"/>
<t t-set="meta_keywords" t-value="main_object and 'website_meta_keywords' in main_object
and main_object.website_meta_keywords or website_meta_keywords"/>
- <meta t-if="meta_description" name="description" t-att-content="meta_description"/>
- <meta t-if="meta_keywords" name="keywords" t-att-content="meta_keywords"/>
+ <meta t-if="meta_description or editable" name="description" t-att-content="meta_description"/>
+ <meta t-if="meta_keywords or editable" name="keywords" t-att-content="meta_keywords"/>
<!-- OpenGraph tags for Facebook sharing -->
<meta property="og:title" t-att-content="additional_title" />