Issue Bug Closed

#107597Erroneous tasks cannot be deleted

Lina Wolf 10/04/25, 05:04 updated 12/02/25, 13:04

Description

I used the recycler to restore a deleted scheduler task from pre TCA times.

I ended up with a task that cannot be deleted from the scheduler module. There is a button to delete it but that button prompts me if I want to delete it but then does nothing:

clipboard-202510040703-by56x.png

The task is also not listed in the list module:

clipboard-202510040703-kc9s2.png

However it was possible to restore it from the recycler

Reviews 1

Files 3

History 49

  1. Lina Wolf commented and changed attached clipboard-202510040708-z0jpy.png 10/04/25, 05:08

    I could only get rid of the erroneus task by setting the deleted tag directly in the database.

    This is the data in the table:

    -- --------------------------------------------------------
    -- Host:                         
    -- Server-Version:               10.4.34-MariaDB-1:10.4.34+maria~ubu2004-log - mariadb.org binary distribution
    -- Server-Betriebssystem:        debian-linux-gnu
    -- HeidiSQL Version:             12.6.0.6765
    -- --------------------------------------------------------
    
    /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
    /*!40101 SET NAMES utf8 */;
    /*!50503 SET NAMES utf8mb4 */;
    /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
    /*!40103 SET TIME_ZONE='+00:00' */;
    /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
    /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
    /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
    
    -- Exportiere Struktur von Tabelle db.tx_scheduler_task
    CREATE TABLE IF NOT EXISTS `tx_scheduler_task` (
      `uid` int(10) unsigned NOT NULL AUTO_INCREMENT,
      `crdate` int(10) unsigned NOT NULL DEFAULT 0,
      `disable` smallint(5) unsigned NOT NULL DEFAULT 0,
      `deleted` smallint(5) unsigned NOT NULL DEFAULT 0,
      `description` longtext DEFAULT NULL,
      `nextexecution` bigint(20) NOT NULL DEFAULT 0,
      `lastexecution_time` bigint(20) NOT NULL DEFAULT 0,
      `lastexecution_failure` longtext DEFAULT NULL,
      `lastexecution_context` varchar(3) NOT NULL DEFAULT '',
      `serialized_task_object` mediumblob DEFAULT NULL,
      `serialized_executions` mediumblob DEFAULT NULL,
      `task_group` longtext DEFAULT NULL,
      `pid` int(10) unsigned NOT NULL DEFAULT 0,
      `tasktype` longtext DEFAULT NULL,
      `parameters` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`parameters`)),
      `execution_details` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`execution_details`)),
      `number_of_days` int(11) NOT NULL DEFAULT 0,
      `selected_tables` varchar(255) DEFAULT '',
      `file_storage` int(10) unsigned NOT NULL DEFAULT 0,
      `cache_backends` longtext DEFAULT NULL,
      `max_file_count` int(10) unsigned NOT NULL DEFAULT 0,
      `ip_mask` int(10) unsigned NOT NULL DEFAULT 0,
      `all_tables` smallint(5) unsigned NOT NULL DEFAULT 0,
      `tx_reports_notification_email` longtext DEFAULT NULL,
      `tx_reports_notification_all` smallint(5) unsigned NOT NULL DEFAULT 0,
      PRIMARY KEY (`uid`),
      KEY `index_nextexecution` (`nextexecution`),
      KEY `parent` (`pid`,`deleted`,`disable`)
    ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;
    
    -- Exportiere Daten aus Tabelle db.tx_scheduler_task: ~3 rows (ungefähr)
    INSERT INTO `tx_scheduler_task` (`uid`, `crdate`, `disable`, `deleted`, `description`, `nextexecution`, `lastexecution_time`, `lastexecution_failure`, `lastexecution_context`, `serialized_task_object`, `serialized_executions`, `task_group`, `pid`, `tasktype`, `parameters`, `execution_details`, `number_of_days`, `selected_tables`, `file_storage`, `cache_backends`, `max_file_count`, `ip_mask`, `all_tables`, `tx_reports_notification_email`, `tx_reports_notification_all`) VALUES
        (1, 1758468230, 0, 1, '', 1758506400, 0, NULL, '', _binary 0x4f3a36323a225459504f335c434d535c5363686564756c65725c5461736b5c43616368696e674672616d65776f726b47617262616765436f6c6c656374696f6e5461736b223a393a7b733a31323a22002a007363686564756c6572223b4e3b733a31303a22002a007461736b556964223b693a313b733a31313a22002a0064697361626c6564223b623a303b733a31393a22002a0072756e4f6e4e65787443726f6e4a6f62223b623a303b733a31323a22002a00657865637574696f6e223b4f3a32393a225459504f335c434d535c5363686564756c65725c457865637574696f6e223a363a7b733a383a22002a007374617274223b693a313735383436383231363b733a363a22002a00656e64223b693a303b733a31313a22002a00696e74657276616c223b693a303b733a31313a22002a006d756c7469706c65223b623a303b733a31303a22002a0063726f6e436d64223b733a393a22302034202a202a202a223b733a32333a22002a0069734e657753696e676c65457865637574696f6e223b623a303b7d733a31363a22002a00657865637574696f6e54696d65223b693a313735383530363430303b733a31343a22002a006465736372697074696f6e223b733a303a22223b733a31323a22002a007461736b47726f7570223b693a303b733a31363a2273656c65637465644261636b656e6473223b613a313a7b693a303b733a34393a225459504f335c434d535c436f72655c43616368655c4261636b656e645c5479706f3344617461626173654261636b656e64223b7d7d, NULL, '0', 0, '', NULL, NULL, 0, '', 0, NULL, 0, 0, 0, NULL, 0),
        (4, 1759553531, 0, 1, '', 1759553820, 0, NULL, '', NULL, NULL, '0', 0, 'cleanup:deletedrecords', '{"optionValues":{"pid":"","depth":"","min-age":"0"},"commandIdentifier":"cleanup:deletedrecords"}', '{"runningType":"1","multiple":false,"start":1759553820,"end":0,"frequency":"","interval":0,"cronCmd":"","isNewSingleExecution":false}', 0, '', 0, '', 1, 2, 0, NULL, 0),
        (5, 1759553597, 0, 1, '', 1759553880, 0, NULL, '', NULL, NULL, '0', 0, 'TYPO3\\CMS\\Reports\\Task\\SystemStatusUpdateTask', '[]', '{"runningType":"1","multiple":false,"start":1759553880,"end":0,"frequency":"","interval":0,"cronCmd":"","isNewSingleExecution":false}', 0, '', 0, '', 1, 2, 0, 'xxx@yyy.de', 0);
    
    /*!40103 SET TIME_ZONE=IFNULL(@OLD_TIME_ZONE, 'system') */;
    /*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
    /*!40014 SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS, 1) */;
    /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
    /*!40111 SET SQL_NOTES=IFNULL(@OLD_SQL_NOTES, 1) */;

    Task one is visible in the scheduler and can be restored from there:

    clipboard-202510040708-z0jpy.png

  2. Garvin Hicking commented and changed status New Accepted priority Should have Must have 10/04/25, 20:10

    Can verify; this is an infinite recursion happening in SchedulerModuleController->deleteTask:

                $task = $this->taskRepository->findByUid($taskUid);

    If you wait long enough you’ll get a timeout exception.

  3. Gerrit Code Review pushed patch set 1 for main to change 90904 status Accepted Under Review 10/04/25, 20:22

  4. Gerrit Code Review pushed patch set 2 for main to change 90904 10/04/25, 21:30

  5. Gerrit Code Review pushed patch set 3 for main to change 90904 10/05/25, 10:10

  6. Gerrit Code Review pushed patch set 4 for main to change 90904 10/05/25, 10:11

  7. Gerrit Code Review pushed patch set 5 for main to change 90904 10/06/25, 08:55

  8. Oliver Bartsch commented and changed status Under Review Resolved done 0 % 100 % 10/09/25, 07:15

    Applied in changeset commit:e062aaed922cde9a035a1cd0e303f7911c463a39.

  9. Benni Mack changed status Resolved Closed 12/02/25, 13:04