[BUGFIX] Silent upgrade wizard changes unrelated field definitions 53/58353/4
authorChristian Kuhn <lolli@schwarzbu.ch>
Thu, 20 Sep 2018 14:20:10 +0000 (16:20 +0200)
committerFrank Naegler <frank.naegler@typo3.org>
Thu, 20 Sep 2018 14:58:37 +0000 (16:58 +0200)
The silent upgrade wizard that should add missing cache
database tables also tends to change fields of not related
tables. The good thing is that this silent upgrader is
not really needed anymore since the "check for missing fields"
step that is always executed afterwards does find and create
cache tables, too.

Resolves: #86228
Releases: master
Change-Id: I9747da74118a6af6368032aa63f6022e0f6c7514
Reviewed-on: https://review.typo3.org/58353
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/install/Classes/Command/UpgradeWizardRunCommand.php
typo3/sysext/install/Classes/Controller/UpgradeController.php
typo3/sysext/install/Classes/Service/UpgradeWizardsService.php
typo3/sysext/install/Resources/Public/JavaScript/Modules/UpgradeWizards.js

index 4d9578d..3e79e5f 100644 (file)
@@ -68,7 +68,6 @@ class UpgradeWizardRunCommand extends Command
         Bootstrap::initializeBackendAuthentication();
         $this->upgradeWizardsService = new UpgradeWizardsService();
         $this->upgradeWizardsService->isDatabaseCharsetUtf8() ?: $this->upgradeWizardsService->setDatabaseCharsetUtf8();
-        $this->upgradeWizardsService->silentCacheFrameworkTableSchemaMigration();
     }
 
     /**
index b75538b..5b2ef04 100644 (file)
@@ -1044,30 +1044,6 @@ class UpgradeController extends AbstractController
     }
 
     /**
-     * Execute silent database field adds like cache framework tables
-     *
-     * @return ResponseInterface
-     */
-    public function upgradeWizardsSilentUpgradesAction(): ResponseInterface
-    {
-        $this->loadExtLocalconfDatabaseAndExtTables();
-        // Perform silent cache framework table upgrade
-        $upgradeWizardsService = new UpgradeWizardsService();
-        $statements = $upgradeWizardsService->silentCacheFrameworkTableSchemaMigration();
-        $messages = new FlashMessageQueue('install');
-        if (!empty($statements)) {
-            $messages->enqueue(new FlashMessage(
-                '',
-                'Created some database cache tables.'
-            ));
-        }
-        return new JsonResponse([
-            'success' => true,
-            'status' => $messages,
-        ]);
-    }
-
-    /**
      * Initialize the core upgrade actions
      *
      * @throws \RuntimeException
index f788a9b..f1e1aef 100644 (file)
@@ -21,7 +21,6 @@ use Doctrine\DBAL\Schema\Column;
 use Doctrine\DBAL\Schema\Table;
 use Symfony\Component\Console\Output\Output;
 use Symfony\Component\Console\Output\StreamOutput;
-use TYPO3\CMS\Core\Cache\DatabaseSchemaService;
 use TYPO3\CMS\Core\Database\ConnectionPool;
 use TYPO3\CMS\Core\Database\Schema\SchemaMigrator;
 use TYPO3\CMS\Core\Database\Schema\SqlReader;
@@ -49,26 +48,6 @@ class UpgradeWizardsService
     }
 
     /**
-     * Force creation / update of caching framework tables that are needed by some update wizards
-     *
-     * @return array List of executed statements
-     */
-    public function silentCacheFrameworkTableSchemaMigration(): array
-    {
-        $sqlReader = GeneralUtility::makeInstance(SqlReader::class);
-        $cachingFrameworkDatabaseSchemaService = GeneralUtility::makeInstance(DatabaseSchemaService::class);
-        $createTableStatements = $sqlReader->getStatementArray(
-            $cachingFrameworkDatabaseSchemaService->getCachingFrameworkRequiredDatabaseSchema()
-        );
-        $statements = [];
-        if (!empty($createTableStatements)) {
-            $schemaMigrationService = GeneralUtility::makeInstance(SchemaMigrator::class);
-            $statements = $schemaMigrationService->install($createTableStatements);
-        }
-        return $statements;
-    }
-
-    /**
      * @return array List of wizards marked as done in registry
      */
     public function listOfWizardsDone(): array
index 5793add..fd0b0a4 100644 (file)
@@ -99,32 +99,6 @@ define([
           success: function (data) {
             if (data.success === true) {
               modalContent.empty().append(data.html);
-              self.silentUpgrades();
-            } else {
-              Notification.error('Something went wrong');
-            }
-          },
-          error: function (xhr) {
-            Router.handleAjaxError(xhr);
-          }
-        });
-      },
-
-      silentUpgrades: function () {
-        var self = this;
-        var $outputContainer = this.currentModal.find(this.selectorOutputWizardsContainer);
-        $outputContainer.empty().html(this.renderProgressBar('Executing some silent upgrades...'));
-        $.ajax({
-          url: Router.getUrl('upgradeWizardsSilentUpgrades'),
-          cache: false,
-          success: function (data) {
-            if (data.success === true && Array.isArray(data.status)) {
-              if (data.status.length > 0) {
-                data.status.forEach((function (element) {
-                  var message = InfoBox.render(element.severity, element.title, element.message);
-                  $outputContainer.append(message);
-                }));
-              }
               self.blockingUpgradesDatabaseCharsetTest();
             } else {
               Notification.error('Something went wrong');