Review main Merged

85505[BUGFIX] Fixed execution of scheduler tasks directly after stopping them

Marno Schmigotzki CR +2 V +2 Easy +14 −13 updated 08/06/24, 09:28

Commit message

The button to stop scheduler tasks in the backend was technically a link
with certain query parameters. As a result, these parameters were
"passed through" after the scheduler task was stopped and falsified the
next request (e.g. starting a scheduler task), which led to an incorrect
result and a message in the backend.
By adapting the link to a submit button with an associated form for
stopping tasks in the backend so that a clean form can be sent, and by
adapting the corresponding controller, this problem was solved.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Georg Ringer +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Georg Ringer +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 89

  1. Marno Schmigotzki uploaded patch set 1 08/03/24, 15:15

  2. core-ci voted on patch set 1 V +1 08/03/24, 15:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62804

  3. Georg Ringer commented on patch set 1 08/04/24, 07:06

    what about using a different approach ``` if (!empty($queryParams['action']['stop'])) { $this->stopTask($view, (int)$queryParams['action']['stop']); return new RedirectResponse($this->uriBuilder->buildUriFromRoute('scheduler')); } ``` so after stopping just redirect to default action?
  4. Marno Schmigotzki commented on patch set 1 08/06/24, 07:55

    Reply

    This would also work, but I have adapted the implementation of the stop button in the template to the other actions (e.g. delete) in order to solve the problem at the origin and to align the code. The redirect would therefore only fix the effect. Or do you see an advantage in retaining the implementation via query parameters?
  5. Christian Kuhn commented on patch set 1 08/06/24, 08:05

    Reply

    solution is fine: post request is the way to go here.
  6. Christian Kuhn voted on patch set 1 CR +1 V +1 08/06/24, 08:17

  7. Georg Ringer voted on patch set 1 CR +1 V +1 08/06/24, 09:06

  8. Christian Kuhn voted on patch set 1 CR +2 V +2 08/06/24, 09:28

  9. Christian Kuhn merged patch set 2 08/06/24, 09:28