Project

General

Profile

Actions

Bug #91516

closed

Install-Tool -> Analyze Database Structure is broken / fails if cache tables dosen't exist

Added by Christian Hackl almost 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2020-05-28
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

if for example database table "cache_hash" or "cache_hash_tags" doesn't exist, then the "Analyze Database Structure" wizard doesn't work - upgrade wizard fails too -> message: "Something went wrong".

At the TYPO3 log:

Thu, 28 May 2020 16:14:41 +0200 [CRITICAL] request="dbf918a918ac0" component="TYPO3.CMS.Core.Error.DebugExceptionHandler": Core: Exception handler (WEB): Uncaught TYPO3 Exception: An exception occurred while executing 'TRUNCATE `cache_hash_tags`':

Table '[DB-Name].cache_hash_tags' doesn't exist | Doctrine\DBAL\Exception\TableNotFoundException thrown in file C:\MAMP\htdocs\typo3_sources\typo3_src-10.4.3\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\AbstractMySQLDriver.php in line 42. Requested URL: http://[DB-Name].localhost/typo3/install.php?install[controller]=maintenance&install[action]=cacheClearAll - {"TYPO3_MODE":"BE","exception":"Doctrine\\DBAL\\Driver\\Mysqli\\MysqliException: Table '[DB-Name].cache_hash_tags' doesn't exist in C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\Driver\\Mysqli\\MysqliConnection.php:161\nStack trace:\n#0 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\Connection.php(1066): Doctrine\\DBAL\\Driver\\Mysqli\\MysqliConnection->exec('TRUNCATE `cache...')\n#1 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Database\\Connection.php(340): Doctrine\\DBAL\\Connection->executeUpdate('TRUNCATE `cache...')\n#2 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Cache\\Backend\\Typo3DatabaseBackend.php(258): TYPO3\\CMS\\Core\\Database\\Connection->truncate('cache_hash_tags')\n#3 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Cache\\Frontend\\AbstractFrontend.php(116): TYPO3\\CMS\\Core\\Cache\\Backend\\Typo3DatabaseBackend->flush()\n#4 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Cache\\CacheManager.php(174): TYPO3\\CMS\\Core\\Cache\\Frontend\\AbstractFrontend->flush()\n#5 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\install\\Classes\\Service\\ClearCacheService.php(111): TYPO3\\CMS\\Core\\Cache\\CacheManager->flushCaches()\n#6 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\install\\Classes\\Service\\ClearCacheService.php(76): TYPO3\\CMS\\Install\\Service\\ClearCacheService->flushCaches(Array)\n#7 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\install\\Classes\\Controller\\MaintenanceController.php(125): TYPO3\\CMS\\Install\\Service\\ClearCacheService->clearAll()\n#8 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\install\\Classes\\Middleware\\Maintenance.php(237): TYPO3\\CMS\\Install\\Controller\\MaintenanceController->cacheClearAllAction(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#9 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Http\\MiddlewareDispatcher.php(121): TYPO3\\CMS\\Install\\Middleware\\Maintenance->process(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest), Object(class@anonymous))\n#10 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Middleware\\NormalizedParamsAttribute.php(45): class@anonymous->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#11 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Http\\MiddlewareDispatcher.php(172): TYPO3\\CMS\\Core\\Middleware\\NormalizedParamsAttribute->process(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest), Object(class@anonymous))\n#12 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Http\\MiddlewareDispatcher.php(78): class@anonymous->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#13 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Http\\AbstractApplication.php(85): TYPO3\\CMS\\Core\\Http\\MiddlewareDispatcher->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#14 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\install\\Classes\\Http\\Application.php(50): TYPO3\\CMS\\Core\\Http\\AbstractApplication->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#15 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Http\\AbstractApplication.php(97): TYPO3\\CMS\\Install\\Http\\Application->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#16 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\install.php(105): TYPO3\\CMS\\Core\\Http\\AbstractApplication->run()\n#17 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\install.php(106): {closure}()\n#18 {main}\n\nNext Doctrine\\DBAL\\Exception\\TableNotFoundException: An exception occurred while executing 'TRUNCATE `cache_hash_tags`':\n\nTable '[DB-Name].cache_hash_tags' doesn't exist in C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\Driver\\AbstractMySQLDriver.php:42\nStack trace:\n#0 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\DBALException.php(166): Doctrine\\DBAL\\Driver\\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\\DBAL\\Driver\\Mysqli\\MysqliException))\n#1 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\DBALException.php(146): Doctrine\\DBAL\\DBALException::wrapException(Object(Doctrine\\DBAL\\Driver\\Mysqli\\Driver), Object(Doctrine\\DBAL\\Driver\\Mysqli\\MysqliException), 'An exception oc...')\n#2 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\Connection.php(1069): Doctrine\\DBAL\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\DBAL\\Driver\\Mysqli\\Driver), Object(Doctrine\\DBAL\\Driver\\Mysqli\\MysqliException), 'TRUNCATE `cache...', Array)\n#3 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Database\\Connection.php(340): Doctrine\\DBAL\\Connection->executeUpdate('TRUNCATE `cache...')\n#4 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Cache\\Backend\\Typo3DatabaseBackend.php(258): TYPO3\\CMS\\Core\\Database\\Connection->truncate('cache_hash_tags')\n#5 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Cache\\Frontend\\AbstractFrontend.php(116): TYPO3\\CMS\\Core\\Cache\\Backend\\Typo3DatabaseBackend->flush()\n#6 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Cache\\CacheManager.php(174): TYPO3\\CMS\\Core\\Cache\\Frontend\\AbstractFrontend->flush()\n#7 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\install\\Classes\\Service\\ClearCacheService.php(111): TYPO3\\CMS\\Core\\Cache\\CacheManager->flushCaches()\n#8 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\install\\Classes\\Service\\ClearCacheService.php(76): TYPO3\\CMS\\Install\\Service\\ClearCacheService->flushCaches(Array)\n#9 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\install\\Classes\\Controller\\MaintenanceController.php(125): TYPO3\\CMS\\Install\\Service\\ClearCacheService->clearAll()\n#10 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\install\\Classes\\Middleware\\Maintenance.php(237): TYPO3\\CMS\\Install\\Controller\\MaintenanceController->cacheClearAllAction(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#11 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Http\\MiddlewareDispatcher.php(121): TYPO3\\CMS\\Install\\Middleware\\Maintenance->process(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest), Object(class@anonymous))\n#12 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Middleware\\NormalizedParamsAttribute.php(45): class@anonymous->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#13 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Http\\MiddlewareDispatcher.php(172): TYPO3\\CMS\\Core\\Middleware\\NormalizedParamsAttribute->process(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest), Object(class@anonymous))\n#14 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Http\\MiddlewareDispatcher.php(78): class@anonymous->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#15 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Http\\AbstractApplication.php(85): TYPO3\\CMS\\Core\\Http\\MiddlewareDispatcher->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#16 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\install\\Classes\\Http\\Application.php(50): TYPO3\\CMS\\Core\\Http\\AbstractApplication->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#17 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Http\\AbstractApplication.php(97): TYPO3\\CMS\\Install\\Http\\Application->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#18 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\install.php(105): TYPO3\\CMS\\Core\\Http\\AbstractApplication->run()\n#19 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\install.php(106): {closure}()\n#20 {main}"}

Expectation:
at least the "Analyze Database Structure" wizard should only create the table if it does not exist before trying to empty it or not?


Related issues 1 (1 open0 closed)

Related to TYPO3 Core - Bug #90962: Cache and Dependency Injection in Upgrade moduleNew2020-04-06

Actions
Actions #1

Updated by Markus Klein almost 4 years ago

  • Related to Bug #90962: Cache and Dependency Injection in Upgrade module added
Actions #2

Updated by Markus Klein almost 4 years ago

Your stack trace says "install[action]=cacheClearAll" did you really press the Analyze Database button?

Actions #3

Updated by Christian Hackl almost 4 years ago

Markus Klein wrote:

Your stack trace says "install[action]=cacheClearAll" did you really press the Analyze Database button?

hmm, currently I cannot reproduce it anymore.
It occurred in any case when pressing the Analyze Database button after updating the LTS version! With very fresh / new installations I could not observe this behavior yet.
But if you ask me like this, I'm not sure if the browser didn't cache the request... although I'm sure I cleared all caches manually.

But since I can't reproduce it anymore...
there are still some LTS jumps with other installations, should this happen again, I will contact you again :)

But thanks already ;)

maybe this is also due to deactivating the caches in the local environment, here I usually use the snippet in the AdditionalConfiguration.php
foreach ($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'] as $cacheName => $cacheConfiguration) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][$cacheName]['backend'] = \TYPO3\CMS\Core\Cache\Backend\NullBackend::class;
}

Actions #4

Updated by Markus Klein almost 4 years ago

  • Status changed from New to Closed

Closing this for the time being then.

And be very cautious with your anti-cache-hammer. For instance the runtime cache should never be changed!

Actions

Also available in: Atom PDF