From 778be8abced469193a4cd9c4dff0cdf021dcb196 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Fri, 23 Jul 2021 09:00:19 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B04195=20-=20Avoid=20dictionary=20entries?= =?UTF-8?q?=20to=20be=20added=20to=20the=20setup=20page=20as=20it=20breaks?= =?UTF-8?q?=20the=20fresh=20install?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In fresh install there is no env-xxx yet, so when the setup tries to load the english dictionary from there it crashes. In setup pages, all string are hard coded, no dictionary entries are available (yet) --- setup/setuppage.class.inc.php | 3 +++ sources/application/WebPage/WebPage.php | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/setup/setuppage.class.inc.php b/setup/setuppage.class.inc.php index c74f1e344..d990ec7b6 100644 --- a/setup/setuppage.class.inc.php +++ b/setup/setuppage.class.inc.php @@ -44,6 +44,9 @@ class SetupPage extends NiceWebPage $this->add_linked_stylesheet(utils::GetAbsoluteUrlAppRoot().'css/font-combodo/font-combodo.css'); $this->LoadTheme(); $this->add_saas("css/setup.scss"); + + // Note: JS dict. entries cannot be added to the setup page as it does not support them well. Install from scratch is mot likely to crash (especially with build packages) as it gonna try to load the english dictionary from env-production which doesn't exists yet + $this->bAddJSDict = false; } /** diff --git a/sources/application/WebPage/WebPage.php b/sources/application/WebPage/WebPage.php index 07f9c0360..23e651438 100644 --- a/sources/application/WebPage/WebPage.php +++ b/sources/application/WebPage/WebPage.php @@ -111,6 +111,11 @@ class WebPage implements Page protected $a_OutputOptions; protected $bPrintable; protected $bHasCollapsibleSection; + /** + * @var bool Whether the JS dictionary entries should be added to the page or not during the final output + * @see static::add_dict_entry + * @see static::add_dict_entries + */ protected $bAddJSDict; /** @var iUIContentBlock $oContentLayout */ protected $oContentLayout;