Closed vmans closed 10 months ago
I can confirm this issue for TYPO3 12.4.5
"Fatal error: Declaration of Causal\ImageAutoresize\Task\fakeSchedulerModuleController::addMessage($message, $severity = TYPO3\CMS\Core\Messaging\FlashMessage::OK) must be compatible with TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::addMessage(TYPO3\CMS\Backend\Template\ModuleTemplate $moduleTemplate, string $message, TYPO3\CMS\Core\Type\ContextualFeedbackSeverity $severity = TYPO3\CMS\Core\Type\ContextualFeedbackSeverity::OK): void in /image_autoresize/Classes/Task/BatchResizeAdditionalFieldProvider.php on line 168"
Confirmed
I also confirm the error
TYPO3 v12 use this: protected function addMessage(ModuleTemplate $moduleTemplate, string $message, ContextualFeedbackSeverity $severity = ContextualFeedbackSeverity::OK): void { $moduleTemplate->addFlashMessage($message, '', $severity); }
and this is not compatible with: class fakeSchedulerModuleController extends \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController { public function addMessage($message, $severity = FlashMessage::OK) { parent::addMessage($message, $severity); } }
What do you think of rewriting the whole scheduler task as a Symfony command instead?
Made a pull request that fixes the method signature of the addMessage
method.
The scheduler backend module won't throw a fatal error with this change.
I can confirm that it works in TYPO3 12.4.7 with the bugfix branch. Thank you @xperseguers
TYPO3 12.4.3 / PHP8.1 / ext 2.2.0
Scheduler crashes when trying to add a new task.