-
Type:
Bug
-
Resolution: Unresolved
-
None
-
Affects Version/s: None
-
Component/s: Translate5 CLI, Workflows
-
Medium
-
PHP error fixed
-
Emptyshow more show less
problem
Obviously the ArchiveWorker to backup and delete a task was triggered twice on the same task leading to DB exception.
probable reason
On the introduction of the visualApprove Workflow all workflow actions were cloned - leading also to duplicated archive actions.

h2.solution
- Create a SysCheck to identify completly duplicated Cron Actions producing warnings if any.
- Definition of Duplication is all entries the same expect the workflow column.
- Create a CLI Tool to clean up duplicated cron triggers.
- With a filter option to filter for specific actions only, used in that case
- By default the tool should ask if the duplicated entry should be deleted, overridable with --force option
- Create a NAME.update.t5cli file calling the CLI tool with --filter for the TaskArchiving and --force to clean up such duplicates on next deployment
worker log
According to the worker log the ArchiveWorker was added twice for the same task. That should not be.
grep "3bcb8da6-6f9a-44f4-b97e-b0f3bbfec13b" data/logs/worker.log | grep queue 2026-02-26 01:00:06.735502 +01:00 queue 3854134 MittagQI\Translate5\Workflow\ArchiveWorker data: {"id":"3854134","parentId":"0","state":"prepare","worker":"MittagQI\\Translate5\\Workflow\\ArchiveWorker","resource":"MittagQI\\Translate5\\Workflow\\ArchiveWorker","slot":"default","maxParallelProcesses":"2","taskGuid":"{3bcb8da6-6f9a-44f4-b97e-b0f3bbfec13b}" 2026-02-26 01:00:07.080165 +01:00 queue 3854154 MittagQI\Translate5\Workflow\ArchiveWorker data: {"id":"3854154","parentId":"0","state":"prepare","worker":"MittagQI\\Translate5\\Workflow\\ArchiveWorker","resource":"MittagQI\\Translate5\\Workflow\\ArchiveWorker","slot":"default","maxParallelProcesses":"2","taskGuid":"{3bcb8da6-6f9a-44f4-b97e-b0f3bbfec13b}"
stack trace
[E9999 core] Zend_Db_Statement_Exception: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'DB1021.LEK_segment_view_a9cbaffd8e3e0d7ea331ccd9ac64ec33' doesn't exist, query was: select mv.cnt mvCnt, tab.cnt tabCnt from (select cou... Log ID: 9553914 Created: 2026-02-26 01:00:19 Level: 2 Event Code: E9999 Domain: core Message: Zend_Db_Statement_Exception: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'DB1021.LEK_segment_view_a9cbaffd8e3e0d7ea331ccd9ac64ec33' doesn't exist, query was: select mv.cnt mvCnt, tab.cnt tabCnt from (select count cnt from LEK_segments where taskGuid = ?) tab, (select count cnt from LEK_segment_view_a9cbaffd8e3e0d7ea331ccd9ac64ec33 where taskGuid = ?) mv; App Version: not defined yet File: /var/www/instances-local/instance-1021/vendor/shardj/zf1-future/library/Zend/Db/Statement/Pdo.php (235) Trace: #0 /var/www/instances-local/instance-1021/vendor/shardj/zf1-future/library/Zend/Db/Statement.php(303): Zend_Db_Statement_Pdo->_execute() #1 /var/www/instances-local/instance-1021/vendor/shardj/zf1-future/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute() #2 /var/www/instances-local/instance-1021/vendor/shardj/zf1-future/library/Zend/Db/Adapter/Pdo/Abstract.php(267): Zend_Db_Adapter_Abstract->query() #3 /var/www/instances-local/instance-1021/vendor/shardj/zf1-future/library/Zend/Db/Adapter/Abstract.php(759): Zend_Db_Adapter_Pdo_Abstract->query() #4 /var/www/instances-local/instance-1021/application/modules/editor/Models/Segment/MaterializedView.php(264): Zend_Db_Adapter_Abstract->fetchRow() #5 /var/www/instances-local/instance-1021/application/modules/editor/Models/Segment/MaterializedView.php(96): editor_Models_Segment_MaterializedView->checkMvFillState() #6 /var/www/instances-local/instance-1021/application/modules/editor/Models/Task.php(703): editor_Models_Segment_MaterializedView->create() #7 /var/www/instances-local/instance-1021/application/modules/editor/src/Workflow/ArchiveWorker.php(81): editor_Models_Task->createMaterializedView() #8 /var/www/instances-local/instance-1021/library/ZfExtended/Worker/Abstract.php(513): MittagQI\Translate5\Workflow\ArchiveWorker->work() #9 /var/www/instances-local/instance-1021/library/ZfExtended/Worker/Abstract.php(428): ZfExtended_Worker_Abstract->_run() #10 /var/www/instances-local/instance-1021/Translate5/MaintenanceCli/Command/WorkerRunCommand.php(142): ZfExtended_Worker_Abstract->runQueued() #11 /var/www/instances-local/instance-1021/vendor/symfony/console/Command/Command.php(298): Translate5\MaintenanceCli\Command\WorkerRunCommand->execute() #12 /var/www/instances-local/instance-1021/vendor/symfony/console/Application.php(1040): Symfony\Component\Console\Command\Command->run() #13 /var/www/instances-local/instance-1021/vendor/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand() #14 /var/www/instances-local/instance-1021/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun() #15 /var/www/instances-local/instance-1021/Translate5/maintenance-cli.php(338): Symfony\Component\Console\Application->run() #16 {main}