From 9cc1d1bd57fd564c3c53e4d2b3c304c1c9328839 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 4 Dec 2021 16:14:49 +0100 Subject: [PATCH] Do not block the DevTools language switch if viewing a non-CMS page --- com.woltlab.wcf/templates/__devtoolsLanguageChooser.tpl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/com.woltlab.wcf/templates/__devtoolsLanguageChooser.tpl b/com.woltlab.wcf/templates/__devtoolsLanguageChooser.tpl index 91864470cc..6c07b27a1c 100644 --- a/com.woltlab.wcf/templates/__devtoolsLanguageChooser.tpl +++ b/com.woltlab.wcf/templates/__devtoolsLanguageChooser.tpl @@ -24,7 +24,11 @@ } var alternateLink = elBySel('link[rel="alternate"][hreflang="' + languageCode + '"]'); - if (alternateLink) { + if ( + alternateLink + && document.body.dataset.application === "wcf" + && document.body.dataset.template === "cms" + ) { // Check if the page does not have unique links per language, such as for the landing page. var currentLink = elBySel('link[rel="alternate"][hreflang="{$__wcf->getLanguage()->getFixedLanguageCode()}"]'); if (!currentLink || currentLink.href !== alternateLink.href) { -- 2.20.1