Bug #55548

Scheduler: Invalid task uid after Database duplication

Added by Matthias Toscanelli over 7 years ago. Updated over 6 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
scheduler
Target version:
-
Start date:
2014-02-01
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.1
PHP Version:
5.3
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

Description

This bug happens if you are doing a copy of task directly in database.

The new record in database will have a new UID but serialized Task object will still have the old UID.
When you try to do an update from TYPO3 Backend module, the old Task is updated when you edit the new one.

One solution would be to update Task UID.

In version 4.5/4.7:
(typo3/sysext/scheduler/class.tx_scheduler.php:300)

$task = unserialize($row['serialized_task_object']);
+ $task->setTaskUid($row['uid']);

(typo3/sysext/scheduler/class.tx_scheduler.php:365)

$task = unserialize($row['serialized_task_object']);
+ $task->setTaskUid($row['uid']);

(typo3/sysext/scheduler/class.tx_scheduler_module.php:611)

$task = unserialize($taskRecord['serialized_task_object']);
+ $task->setTaskUid($taskRecord['uid']);

(typo3/sysext/scheduler/class.tx_scheduler_module.php:1047)

$task = unserialize($schedulerRecord['serialized_task_object']);
+ $task->setTaskUid($schedulerRecord['uid']);

(typo3/sysext/scheduler/class.tx_scheduler_module.php:1231)

$task = unserialize($taskRecord['serialized_task_object']);
+ $task->setTaskUid($taskRecord['uid']);

In version 6.0/6.1:
(typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php:557)

$task = unserialize($taskRecord['serialized_task_object']);
+ $task->setTaskUid($taskRecord['uid']);

(typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php:945)

$task = unserialize($schedulerRecord['serialized_task_object']);
+ $task->setTaskUid($schedulerRecord['uid']);

(typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php:1110)

$task = unserialize($taskRecord['serialized_task_object']);
+ $task->setTaskUid($taskRecord['uid']);

(typo3/sysext/scheduler/Classes/Scheduler.php:108)

$task = unserialize($row['serialized_task_object']);
+ $task->setTaskUid($row['uid']);

(typo3/sysext/scheduler/Classes/Scheduler.php:277)

$task = unserialize($row['serialized_task_object']);
+ $task->setTaskUid($row['uid']);

(typo3/sysext/scheduler/Classes/Scheduler.php:337)

$task = unserialize($row['serialized_task_object']);
+ $task->setTaskUid($row['uid']);


Related issues

Related to TYPO3 Core - Feature #83338: Move scheduler tasks from serialized data to JSONClosed2017-12-15

Actions
#1

Updated by Mathias Schreiber over 6 years ago

  • Status changed from New to Rejected

Hi Matthias,

the "master" in this case is indeed the serialized object.
The database row only follows its lead.

#2

Updated by Dan Untenzu about 3 years ago

  • Related to Feature #83338: Move scheduler tasks from serialized data to JSON added

Also available in: Atom PDF