[FOLLOWUP][FEATURE] Streamline Fluid Styled Content and CSS Styled Content 61/51561/6
authorBenjamin Kott <benjamin.kott@wfp2.com>
Tue, 7 Feb 2017 11:05:44 +0000 (12:05 +0100)
committerSusanne Moog <susanne.moog@typo3.org>
Wed, 8 Feb 2017 14:14:25 +0000 (15:14 +0100)
The database field `section_frame` is only available if CSS Styled
Content was installed previously, that needs to be respected by the
upgrade wizard and only enable the wizard if the field is present in
the database.

Releases: master
Resolves: #79622
Change-Id: I276dae3ea8ca8a07001b378ab8789e054d76c947
Reviewed-on: https://review.typo3.org/51561
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Frans Saris <franssaris@gmail.com>
Reviewed-by: Tobi Kretschmann <tobi@tobishome.de>
Tested-by: Tobi Kretschmann <tobi@tobishome.de>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
typo3/sysext/install/Classes/Updates/SectionFrameToFrameClassUpdate.php

index 3361f55..7390162 100644 (file)
@@ -39,6 +39,12 @@ class SectionFrameToFrameClassUpdate extends AbstractUpdate
         if ($this->isWizardDone()) {
             return false;
         }
+        $connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable('tt_content');
+        $tableColumns = $connection->getSchemaManager()->listTableColumns('tt_content');
+        // Only proceed if section_frame field still exists
+        if (!isset($tableColumns['section_frame'])) {
+            return false;
+        }
         $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tt_content');
         $queryBuilder->getRestrictions()->removeAll()->add(GeneralUtility::makeInstance(DeletedRestriction::class));
         $elementCount = $queryBuilder->count('uid')