Bug #79141
closed
Unable to create scheduler tasks: Call to a getNotificationEmail() on null
Added by Christian Weiske over 7 years ago.
Updated over 5 years ago.
Description
On a TYPO3 7.6.10 instance I cannot create scheduler tasks. Whenever trying to save a new scheduler task, I get an exception:
Call to a member function getNotificationEmail() on null
Error thrown in file
/var/www/site/htdocs/typo3_src/typo3/sysext/reports/Classes/Task/SystemStatusUpdateTaskNotificationEmailField.php in line 49.
called in TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::editTaskAction()
$additionalFields = $providerObject->getAdditionalFields($taskInfo, null, $this);
SystemStatusUpdateTaskNotificationEmailField
gets called with a null
task, but it unconditionally calls $task->getNotificationEmail()
.
Strangely on a 7.6.10 system that works, $schedulerModule->CMD
is set to add
, while it is set to edit
on the broken system.
Aha!
The scheduler extension was enabled recently, but the scheduler database tables did not exist.
Creating them with the install tool -> "compare database with specification" made it work.
Nontheless, the error message is very confusing.
- Assignee set to Stephan Großberndt
The problem is actually in the implementations of AdditionalFieldProviderInterface. Although even in PHPDoc its clearly stated * @param \TYPO3\CMS\Scheduler\Task\AbstractTask $task The task object being edited. Null when adding a task!
some core additional fields do not check for NULL
Ok, so since this happens when editing a task (editTaskAction) - task should not be NULL, so we might add a check on task being NULL when editing
- Status changed from New to Under Review
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Under Review
- Status changed from Under Review to Resolved
- Status changed from Resolved to Closed
Also available in: Atom
PDF