Catch the fatal database exceptions in installation progress
"DatabaseSelect" and show a error message.
Releases: 8.7, master
Resolves: #81726
Change-Id: Id7edbdaafa97374451493d6bb9c9fdaabd2f2674
Reviewed-on: https://review.typo3.org/53498
Reviewed-by: Wolfgang Klinger <wolfgang@wazum.com>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Tested-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Reviewed-by: Philipp Gampe <philipp.gampe@typo3.org>
Tested-by: Philipp Gampe <philipp.gampe@typo3.org>
Reviewed-by: Joerg Boesche <typo3@joergboesche.de>
Tested-by: Joerg Boesche <typo3@joergboesche.de>
Reviewed-by: Jan Stockfisch <jan.stockfisch@googlemail.com>
Reviewed-by: Henning Liebe <h.liebe@neusta.de>
Tested-by: Henning Liebe <h.liebe@neusta.de>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
*/
protected function executeAction()
{
*/
protected function executeAction()
{
/** @var $configurationManager ConfigurationManager */
$configurationManager = GeneralUtility::makeInstance(ConfigurationManager::class);
$isInitialInstallationInProgress = $configurationManager
->getConfigurationValueByPath('SYS/isInitialInstallationInProgress');
/** @var $configurationManager ConfigurationManager */
$configurationManager = GeneralUtility::makeInstance(ConfigurationManager::class);
$isInitialInstallationInProgress = $configurationManager
->getConfigurationValueByPath('SYS/isInitialInstallationInProgress');
- $this->view->assign('databaseList', $this->getDatabaseList($isInitialInstallationInProgress));
+ try {
+ $this->view->assign('databaseList', $this->getDatabaseList($isInitialInstallationInProgress));
+ } catch (\Exception $exception) {
+ $errors[] = $exception->getMessage();
+ }
+ $this->view->assign('errors', $errors);
$this->view->assign('isInitialInstallationInProgress', $isInitialInstallationInProgress);
$this->assignSteps();
return $this->view->render();
$this->view->assign('isInitialInstallationInProgress', $isInitialInstallationInProgress);
$this->assignSteps();
return $this->view->render();
+ <f:if condition="{errors -> f:count()}">
+ <f:for each="{errors}" as="error">
+ <div class="alert alert-danger">
+ <h4>Exception</h4>
+ <p>{error}</p>
+ </div>
+ </f:for>
+ </f:if>
+
<f:if condition="{isInitialInstallationInProgress}">
<f:then>
You have two options:
<f:if condition="{isInitialInstallationInProgress}">
<f:then>
You have two options: