imageopt
imageopt copied to clipboard
Missing array key breaks processing - probably missing processed file
I'm not really sure what is happening there, but it's likely that some processed files are not generated properly on one of my systems. So there are quite some processed files missing that already caused me some troubles in the past and i have not found the cause for it...
Thus when the imageopt:optimizefalprocessedimages task runs, it breaks with this message. Sometimes right after executing the task, sometimes after it processed some files.
{
"message": "Task threw an error: TYPO3\\CMS\\Scheduler\\Task\\ExecuteSchedulableCommandTask' (UID: 33). Was started at 2023-07-26 16:00:00. Error: a:5:{s:4:\"code\";i:1;s:7:\"message\";s:31:\"Warning: Undefined array key \"\"\";s:4:\"file\";s:88:\"\/var\/www\/www.example.org\/private\/typo3conf\/ext\/imageopt\/Classes\/Utility\/CliDisplayUtility.php\";s:4:\"line\";i:101;s:11:\"traceString\";s:2245:\"#0 \/var\/www\/www.example.org\/private\/typo3conf\/ext\/imageopt\/Classes\/Command\/OptimizeFalProcessedImages.php(80): SourceBroker\\Imageopt\\Utility\\CliDisplayUtility::displayOptionResult()\n#1 \/var\/www\/www.example.org\/vendor\/symfony\/console\/Command\/Command.php(298): SourceBroker\\Imageopt\\Command\\OptimizeFalProcessedImages->execute()\n#2 \/var\/www\/www.example.org\/private\/typo3\/sysext\/scheduler\/Classes\/Task\/ExecuteSchedulableCommandTask.php(106): Symfony\\Component\\Console\\Command\\Command->run()\n#3 \/var\/www\/www.example.org\/private\/typo3\/sysext\/scheduler\/Classes\/Scheduler.php(192): TYPO3\\CMS\\Scheduler\\Task\\ExecuteSchedulableCommandTask->execute()\n#4 \/var\/www\/www.example.org\/private\/typo3\/sysext\/scheduler\/Classes\/Command\/SchedulerCommand.php(255): TYPO3\\CMS\\Scheduler\\Scheduler->executeTask()\n#5 \/var\/www\/www.example.org\/private\/typo3\/sysext\/scheduler\/Classes\/Command\/SchedulerCommand.php(194): TYPO3\\CMS\\Scheduler\\Command\\SchedulerCommand->executeOrStopTask()\n#6 \/var\/www\/www.example.org\/private\/typo3\/sysext\/scheduler\/Classes\/Command\/SchedulerCommand.php(120): TYPO3\\CMS\\Scheduler\\Command\\SchedulerCommand->loopTasks()\n#7 \/var\/www\/www.example.org\/vendor\/symfony\/console\/Command\/Command.php(298): TYPO3\\CMS\\Scheduler\\Command\\SchedulerCommand->execute()\n#8 \/var\/www\/www.example.org\/vendor\/symfony\/console\/Application.php(1040): Symfony\\Component\\Console\\Command\\Command->run()\n#9 \/var\/www\/www.example.org\/vendor\/helhum\/typo3-console\/Classes\/Console\/Mvc\/Cli\/Symfony\/Application.php(189): Symfony\\Component\\Console\\Application->doRunCommand()\n#10 \/var\/www\/www.example.org\/vendor\/symfony\/console\/Application.php(301): Helhum\\Typo3Console\\Mvc\\Cli\\Symfony\\Application->doRunCommand()\n#11 \/var\/www\/www.example.org\/vendor\/symfony\/console\/Application.php(171): Symfony\\Component\\Console\\Application->doRun()\n#12 \/var\/www\/www.example.org\/vendor\/helhum\/typo3-console\/Classes\/Console\/Core\/Kernel.php(118): Symfony\\Component\\Console\\Application->run()\n#13 \/var\/www\/www.example.org\/vendor\/helhum\/typo3-console\/Scripts\/typo3-console.php(18): Helhum\\Typo3Console\\Core\\Kernel->handle()\n#14 \/var\/www\/www.example.org\/vendor\/helhum\/typo3-console\/Scripts\/typo3-console.php(20): {closure}()\n#15 \/var\/www\/www.example.org\/vendor\/helhum\/typo3-console\/typo3cms(3): require('...')\n#16 \/var\/www\/www.example.org\/vendor\/bin\/typo3cms(107): include('...')\n#17 {main}\";} ",
"time": "26.07.2023 16:00",
"task": "O:54:\"TYPO3\\CMS\\Scheduler\\Task\\ExecuteSchedulableCommandTask\":14:{s:12:\"\u0000*\u0000scheduler\";N;s:10:\"\u0000*\u0000taskUid\";i:33;s:11:\"\u0000*\u0000disabled\";b:0;s:19:\"\u0000*\u0000runOnNextCronJob\";b:0;s:12:\"\u0000*\u0000execution\";O:29:\"TYPO3\\CMS\\Scheduler\\Execution\":6:{s:8:\"\u0000*\u0000start\";i:1686562144;s:6:\"\u0000*\u0000end\";s:1:\"0\";s:11:\"\u0000*\u0000interval\";i:0;s:11:\"\u0000*\u0000multiple\";s:1:\"0\";s:10:\"\u0000*\u0000cronCmd\";s:11:\"0 *\/1 * * *\";s:23:\"\u0000*\u0000isNewSingleExecution\";b:0;}s:16:\"\u0000*\u0000executionTime\";i:1690380000;s:14:\"\u0000*\u0000description\";s:0:\"\";s:12:\"\u0000*\u0000taskGroup\";i:0;s:9:\"\u0000*\u0000logger\";N;s:20:\"\u0000*\u0000commandIdentifier\";s:35:\"imageopt:optimizefalprocessedimages\";s:12:\"\u0000*\u0000arguments\";a:0:{}s:10:\"\u0000*\u0000options\";a:2:{s:23:\"numberOfImagesToProcess\";b:1;s:19:\"rootPageForTsConfig\";b:0;}s:15:\"\u0000*\u0000optionValues\";a:2:{s:23:\"numberOfImagesToProcess\";s:3:\"100\";s:19:\"rootPageForTsConfig\";s:0:\"\";}s:11:\"\u0000*\u0000defaults\";a:2:{s:23:\"numberOfImagesToProcess\";N;s:19:\"rootPageForTsConfig\";N;}}"
}
@akiessling Can you somehow reproduce it?
@akiessling
I looked on the code an in fact there were some inconsistencies that could bring such problems therefore I refactored the code a lot. New version is available on branch refactor.
If you want you can test it but please read CHANGELOG.rst before installing and testing that version.