diff --git a/setup/setuppage.class.inc.php b/setup/setuppage.class.inc.php index 480b4eb02..e89d85087 100644 --- a/setup/setuppage.class.inc.php +++ b/setup/setuppage.class.inc.php @@ -49,9 +49,6 @@ class SetupPage extends NiceWebPage $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 c214ddc9d..64f879087 100644 --- a/sources/application/WebPage/WebPage.php +++ b/sources/application/WebPage/WebPage.php @@ -215,7 +215,8 @@ class WebPage implements Page $this->aBlockParams = []; $this->bHasCollapsibleSection = false; $this->bPrintable = $bPrintable; - $this->bAddJSDict = true; + // Note: JS dict. entries cannot be added to a page if current environment and config file aren't available yet. + $this->bAddJSDict = class_exists('\Dict') && file_exists(utils::GetConfigFilePath()); $this->oContentLayout = new UIContentBlock(); $this->SetTemplateRelPath(static::DEFAULT_PAGE_TEMPLATE_REL_PATH);