Issue Feature Rejected

#102444Show FlashMessages on Drag and Drop (DND) in TYPO3 page tree

Josef Glatz 11/22/23, 09:54 updated 03/28/25, 12:34

Description

Problem/Description

There are scenarios where you have to inform the backend editor via flash messages or notifications when you hook into the TYPO3 DataHandler where DataHandler is started by drag-n-drop (DnD) in the TYPO3 pagetee.

Some scenarios:

  • add a barrier prevent a action on pages which was started via DnD (drag and drop) in the TYPO3 pagetree
  • prevent copying/moving pages from one TYPO3 site to another TYPO3 site (e.g. due to #102345)
  • inform the backend editor about automatically changed values on moved/copied pages
  • …

Example of creating a FlashMessage in a DataHandler hook:

// ... and show a flash message
$message = GeneralUtility::makeInstance(
    FlashMessage::class,
    LocalizationUtility::translate('LLL:EXT:theme/Resources/Private/Language/locallang_BackendGeneral.xlf:flashMessage.body.move_or_copy_denied'),
    LocalizationUtility::translate('LLL:EXT:theme/Resources/Private/Language/locallang_BackendGeneral.xlf:flashMessage.title.move_or_copy_denied'),
    AbstractMessage::WARNING,
    true
);
$flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);
$flashMessageService->getMessageQueueByIdentifier()
    ->addMessage($message);

ToDo(s)

Introduce a possibility like AJAX-Middlewares which are looking for “things” in the response like checking if there are flash messages in the queue which are then shown as e.g. notifications.

Acceptance Criteria

Creating flashMessages in DataHandler hooks would be a benefit for any scenario in improving the backend user experience

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 2

  1. Georg Ringer commented and changed status New Rejected <span data-processor="relativetime" data-value="2025-03-28T12:34:54+00:00" > 03/28/25, 12:34 </span>

    I am rejecting this as this is kind of impossible to achieve. additionally I am wondering why someone should be not allowed to e.g. copy a page via page tree but is allowed via all other functionalities! consistency is very important and it should not mattter how e.g. a page is copied. restricting that would be possible in the datahandler via hooks already.