Typo3 Cache Flush Exception - How to debug

639 views Asked by At

I have a dockerized TYPO3 instance on a server and try to flush the typo3 cache manually. So, I use the following command to do that, inside my docker container:

vendor/.bin/typo3cms cache:flush

However, it fails and returns this error:

[ TYPO3\CMS\Core\Error\Exception ]
Warning: rename(): The first argument to copy() function cannot be a directory in /home/app/vendor/typo3/cms/typo3/sysext/core/Classes/Utility/GeneralUtility.php line 2432

How I can debug this and find out what the problem is?

Full stack trace with -vvv

  [ TYPO3\CMS\Core\Error\Exception ]
  Warning: rename(): The first argument to copy() function cannot be a directory in /home/app/vendor/typo3/cms/typo3/sysext/core/Classes/Utili
  ty/GeneralUtility.php line 2432


Exception code: 1

Exception trace:
#0 ()
   vendor/helhum/typo3-console/Classes/Console/Error/ErrorHandler.php:86
#1 Helhum\Typo3Console\Error\ErrorHandler->handleError()
#2 rename()
   typo3/sysext/core/Classes/Utility/GeneralUtility.php:2432
#3 TYPO3\CMS\Core\Utility\GeneralUtility::flushDirectory()
   vendor/helhum/typo3-console/Classes/Compatibility/TYPO3v87/Service/CacheLowLevelCleaner.php:31
#4 Helhum\Typo3Console\TYPO3v87\Service\CacheLowLevelCleaner->forceFlushCachesFiles()
   vendor/helhum/typo3-console/Classes/Console/Command/Cache/CacheFlushCommand.php:69
#5 Helhum\Typo3Console\Command\Cache\CacheFlushCommand->execute()
   vendor/symfony/console/Command/Command.php:255
#6 Symfony\Component\Console\Command\Command->run()
   vendor/symfony/console/Application.php:1000
#7 Symfony\Component\Console\Application->doRunCommand()
   vendor/helhum/typo3-console/Classes/Console/Mvc/Cli/Symfony/Application.php:169
#8 Helhum\Typo3Console\Mvc\Cli\Symfony\Application->doRunCommand()
   vendor/symfony/console/Application.php:271
#9 Symfony\Component\Console\Application->doRun()
   vendor/symfony/console/Application.php:147
#10 Symfony\Component\Console\Application->run()
   vendor/helhum/typo3-console/Classes/Console/Core/Kernel.php:148
#11 Helhum\Typo3Console\Core\Kernel->handle()
   vendor/helhum/typo3-console/Scripts/typo3-console.php:30
#12 {closure}()
   vendor/helhum/typo3-console/Scripts/typo3-console.php:32
#13 require()
   vendor/helhum/typo3-console/typo3cms:3

cache:flush [--files-only]
1

There are 1 answers

0
Mathias Brodala On BEST ANSWER

This was a known issue and fixed with version 5.8.6 of the TYPO3 Console.