xperseguers / t3ext-image_autoresize

TYPO3 Extension image_autoresize. Simplify the way your editors may upload their images.
https://extensions.typo3.org/extension/image_autoresize
GNU General Public License v3.0
16 stars 22 forks source link

Scheduler crashes #80

Closed vmans closed 9 months ago

vmans commented 1 year ago

TYPO3 12.4.3 / PHP8.1 / ext 2.2.0

Scheduler crashes when trying to add a new task.

tmay-px commented 1 year 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"

pulponair commented 1 year ago

Confirmed

jackermann commented 11 months ago

I also confirm the error

andreashurst commented 11 months ago

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); } }

xperseguers commented 11 months ago

What do you think of rewriting the whole scheduler task as a Symfony command instead?

cepheiVV commented 9 months ago

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.

xperseguers commented 9 months ago

Please test https://github.com/xperseguers/t3ext-image_autoresize/tree/bugfix/scheduler-80

ErHaWeb commented 9 months ago

I can confirm that it works in TYPO3 12.4.7 with the bugfix branch. Thank you @xperseguers