Issue Bug Closed

#64836Can't create new scheduler tasks, if CommandController has been added wrong

Armin Vieweg 02/03/15, 20:33 updated 10/02/18, 11:46

Description

When I am adding in my extbase extension a new CommandController and it does not contain the words “CommandController” an exception will be thrown [1].

But this exception will not be displayed, because in Scheduler module there exists a try/catch [2] which just continues with output and outputs the list instead of the add form.

The result is:
2015-02-03_2031.png

This issue occurs in TYPO3 6.2.9 and current master (7.1).

——-

[1]
if (count($classNameParts) !== 4 || strpos($classNameParts3, ‘CommandController’) === FALSE) {
throw new \InvalidArgumentException(‘Invalid controller class name “’ . $controllerClassName . ‘”’, 1305100019);
}
[2]
switch ($this->CMD) {
case ‘add’:
case ‘edit’:
try {
// Try adding or editing
$content .= $this->editTaskAction();
$sectionTitle = $this->getLanguageService()->getLL(‘action.’ . $this->CMD);
} catch (\Exception $e) {
// An exception may happen when the task to
// edit could not be found. In this case revert
// to displaying the list of tasks
// It can also happen when attempting to edit a running task
$content .= $this->listTasksAction();
}
break;
}

Reviews 2