From 838d557eafd04a81086eb7ebe3fe280ff366cb73 Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Thu, 16 May 2019 14:20:40 +0000 Subject: [PATCH] [FIX] website: rte_translator ok in manual & debug The rte_translator tour that test translation on the frontend could not be started from the "[debug menu]" > "Start Tour" for two reasons: - the start URL is not specified, so the test was started on current backend page wich is wrong (in python the start url is "/") - the backend original state (params after #) does not work with ?k=v inside argument value, so `#return_url=/?debug=true`. To solve this issue, we encode the return_url value and add a start url when rte_translator is started manually. opw-1998623 closes #33443 Signed-off-by: Nicolas Lempereur (nle) --- addons/website/static/src/js/tours/rte.js | 1 + addons/website/views/website_templates.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/website/static/src/js/tours/rte.js b/addons/website/static/src/js/tours/rte.js index 67426a64303..58ddca69424 100644 --- a/addons/website/static/src/js/tours/rte.js +++ b/addons/website/static/src/js/tours/rte.js @@ -6,6 +6,7 @@ var base = require('web_editor.base'); tour.register('rte_translator', { test: true, + url: '/', wait_for: base.ready(), }, [{ content: "click on Add a language", diff --git a/addons/website/views/website_templates.xml b/addons/website/views/website_templates.xml index cc7cff9ca93..a3bd1d3f246 100644 --- a/addons/website/views/website_templates.xml +++ b/addons/website/views/website_templates.xml @@ -401,7 +401,7 @@
  • - + Add a language...