Bug #79141
closedUnable to create scheduler tasks: Call to a getNotificationEmail() on null
100%
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()
.
Updated by Christian Weiske over 7 years ago
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.
Updated by Christian Weiske over 7 years ago
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.
Updated by Stephan Großberndt over 6 years ago
- 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
Updated by Stephan Großberndt over 6 years ago
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
Updated by Gerrit Code Review over 6 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55122
Updated by Gerrit Code Review over 6 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55122
Updated by Stephan Großberndt over 6 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 1d99aa104fb0700833bd5b4507934941afa19dfa.
Updated by Gerrit Code Review over 6 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55267
Updated by Stephan Großberndt over 6 years ago
- Status changed from Under Review to Resolved
Applied in changeset d61eababbae12f014f3f6b2942271ff7b69cd16f.