Issue Bug Closed

#104765Scheduler : "unsaved changes" modal pops up when closing task without any changes

Sébastien Delcroix 08/28/24, 15:34 updated 08/12/25, 14:36

Description

In TYPO3 12.4.19, when closing a scheduler task without having made any changes, a modal appears saying that there are unsaved changes.

image.png

Mathias Brodala discovered that the timezone changes in the “start” field value.
For instance, initially there is e.g.
2020-09-30T06:57:25Z

On close it says
2020-09-30T08:57:25+02:00

That doesn’t seems to happen when the server is using UTC.

Reviews 6

Files 2

History 1620

  1. Oliver Bartsch commented and changed status New Accepted <span data-processor="relativetime" data-value="2024-09-24T14:54:20+00:00" > 09/24/24, 14:54 </span>

    Yes, I just stumbled upon it.

  2. Netresearch DTT GmbH commented <span data-processor="relativetime" data-value="2024-12-19T09:58:25+00:00" > 12/19/24, 09:58 </span>

    We have the same issue, but server runs on UTC. Saving our custom task using the provided modal results in corrupt configuration data stored for this task.

  3. Florian Seirer commented <span data-processor="relativetime" data-value="2025-03-11T09:52:15+00:00" > 03/11/25, 09:52 </span>

    Everytime you open a task and save/close it without actually changing anything, the scheduled starttime moves up one hour.
    Close and open it again, and the starttime moves up another hour.

    You have to be really careful, because there is no warning for this (apart from the message like in the description, but that is not really clear about the new starttime)! This could mess up your whole schedule timetable.

  4. Gerrit Code Review pushed patch set 1 for main to change 88584 status Accepted Under Review <span data-processor="relativetime" data-value="2025-03-13T10:26:27+00:00" > 03/13/25, 10:26 </span>

  5. Benjamin Franzke commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2025-03-17T07:40:11+00:00" > 03/17/25, 07:40 </span>

    Applied in changeset commit:b3d7b5208206f8f770e54ba0250b43ca0e7274e8.

  6. Florian Seirer commented <span data-processor="relativetime" data-value="2025-03-18T14:55:57+00:00" > 03/18/25, 14:55 </span>

    I have updated to the just released TYPO3 12.4.28 which includes the bugfix for this issue.

    When I try to edit a task in the scheduler module, I get the following error (using the debug preset in the development context):

    TypeError
    TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::formatTimestampForDatePicker(): Argument #1 ($timestamp) must be of type int, string given, called in /var/dvt/html/t3xxx/vendor/typo3/cms-scheduler/Classes/Controller/SchedulerModuleController.php on line 448
  7. Garvin Hicking commented <span data-processor="relativetime" data-value="2025-03-18T16:01:27+00:00" > 03/18/25, 16:01 </span>

    florian.seirer seirerman @old_seirerman Do you happen to have a full stack trace or details of the specific task? We’re having a problem to reproduce.

  8. Florian Seirer commented and changed attached 104765.txt <span data-processor="relativetime" data-value="2025-03-18T16:05:13+00:00" > 03/18/25, 16:05 </span>

    Sure (see attached file).

    Do you need data from the DB as well?

  9. Garvin Hicking commented <span data-processor="relativetime" data-value="2025-03-18T16:28:49+00:00" > 03/18/25, 16:28 </span>

    That could help, my guess is it might be due to a serialized “old school” task (read: not symfony command task) where the timestamp might be an int…?

  10. Oliver Hader commented <span data-processor="relativetime" data-value="2025-03-18T16:38:33+00:00" > 03/18/25, 16:38 </span>

    Florian Seirer wrote in #note-15:
    > Sure (see attached file).
    >
    > Do you need data from the DB as well?

    Line 448 in TPYO3 v12.4.28 uses to this code:

    'end' => $parsedBody['end'] ?? ($taskType === AbstractTask::TYPE_RECURRING ? $this->formatTimestampForDatePicker($taskExecution->getEnd()) : ''),

    The end property is not type-safe and might be string as well.

    Florian, can you please provide the field serialized_task_object of database table tx_scheduler_task of the corresponding task record that lead to this failure? Thanks in advance!

  11. Garvin Hicking commented <span data-processor="relativetime" data-value="2025-03-18T19:22:10+00:00" > 03/18/25, 19:22 </span>

    Maybe we can continue here:

    https://forge.typo3.org/issues/106383

    I’ve added a WIplO patch for it but couldnt reproduce yet; if you can test that Florian (additionally to providing the dump Oliver mentioned) that would be great.