Skip to content
Snippets Groups Projects
Commit 54306301 authored by Thomas Hohn's avatar Thomas Hohn Committed by Markus Klein
Browse files

[BUGFIX] Upgrade Wizard "Split menu types.." fails

Show warning if table tt_content doesn't have column
menu_type instead of SQL error.

Resolves: #79813
Releases: master
Change-Id: Ibb6e260f45e65c2fc563be129d2da43c05a9eaf6
Reviewed-on: https://review.typo3.org/51858


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarPhilipp Gampe <philipp.gampe@typo3.org>
Reviewed-by: default avatarDaniel Goerz <ervaude@gmail.com>
Tested-by: default avatarDaniel Goerz <ervaude@gmail.com>
Reviewed-by: default avatarMarkus Klein <markus.klein@typo3.org>
Tested-by: default avatarMarkus Klein <markus.klein@typo3.org>
parent 219a6882
Branches
Tags
No related merge requests found
......@@ -39,6 +39,12 @@ class SplitMenusUpdate extends AbstractUpdate
if ($this->isWizardDone()) {
return false;
}
$connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable('tt_content');
$tableColumns = $connection->getSchemaManager()->listTableColumns('tt_content');
// Only proceed if menu_type field still exists
if (!isset($tableColumns['menu_type'])) {
return false;
}
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tt_content');
$queryBuilder->getRestrictions()->removeAll()->add(GeneralUtility::makeInstance(DeletedRestriction::class));
$elementCount = $queryBuilder->count('uid')
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment