Issue Bug Closed

#93207Duplicate error message in AjaxDataHandler.ts

Simon Schaufelberger 01/02/21, 22:34 updated 02/23/21, 13:13

Description

I noticed that handleErrors is called twice in Build/Sources/TypeScript/backend/Resources/Public/TypeScript/AjaxDataHandler.ts.

Once in AjaxDataHandler->initialize and again in AjaxDataHandler->process.

One of both should be removed. I believe removing the one in initialize makes more sense as the one in process will also get called when deleting a record.

How to reproduce:

Put these lines in \TYPO3\CMS\Backend\Controller\SimpleDataHandlerController::processAjaxRequest after “$this->tce->printLogErrorMessages();” to force an error flash message:

 $flashMessageService->getMessageQueueByIdentifier()->addMessage(GeneralUtility::makeInstance(
            \TYPO3\CMS\Core\Messaging\FlashMessage::class,
            'Duplicate error message!',
            'Duplicate error message title',
            \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR
        ));

Reviews 2