N°4195 - Avoid dictionary entries to be added to the setup page as it breaks the fresh install

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)
This commit is contained in:
Molkobain
2021-07-23 09:00:19 +02:00
parent 0760adcef6
commit 778be8abce
2 changed files with 8 additions and 0 deletions

View File

@@ -44,6 +44,9 @@ class SetupPage extends NiceWebPage
$this->add_linked_stylesheet(utils::GetAbsoluteUrlAppRoot().'css/font-combodo/font-combodo.css'); $this->add_linked_stylesheet(utils::GetAbsoluteUrlAppRoot().'css/font-combodo/font-combodo.css');
$this->LoadTheme(); $this->LoadTheme();
$this->add_saas("css/setup.scss"); $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;
} }
/** /**

View File

@@ -111,6 +111,11 @@ class WebPage implements Page
protected $a_OutputOptions; protected $a_OutputOptions;
protected $bPrintable; protected $bPrintable;
protected $bHasCollapsibleSection; 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; protected $bAddJSDict;
/** @var iUIContentBlock $oContentLayout */ /** @var iUIContentBlock $oContentLayout */
protected $oContentLayout; protected $oContentLayout;