1 unresolved comment The owner has to answer or resolve it. Show the first one

Review main Ready for review

98259[FEATURE] Deliver flash messages to a backend user

Markus Hofmann CR 0 V 0 Hard +795 −0 updated 12/01/26, 12:21

Commit message

Flash messages and backend notifications are stored in the session of
the backend user of the current request. Console commands, scheduler
tasks and handlers of the message bus run without that session and had
no way to give feedback to the backend user who started the work.

The new BackendUserMessageService stores a flash message for a given
backend user in the new table sys_be_user_message. With the next
backend request of that user, which is not an AJAX request, the
middleware BackendUserMessageDelivery moves the stored messages into
the flash message queues of the user, where the existing rendering
shows them. By default, messages are shown as notifications.

Title and message may be label references. They are translated when
the message is delivered, into the language of the receiving user,
as the sender usually runs in another language or without a user at
all. Optional arguments replace sprintf() placeholders, including
positional ones, or ICU placeholders after the translation. Text
which is no label reference is shown as it is.

Each stored message is deleted before it is enqueued, and only
enqueued if the deletion succeeded, so it is delivered once, even with
several sessions or parallel requests of the same user. Messages that
are never delivered expire after 30 days through the table garbage
collection task.
Show more Show less

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 1
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/59/98259/1 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/59/98259/1 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V 0 Needs a vote
    • core-ci +1 CI

Merge conflicts 10

Show 5 more changes Show less

Issues 1

Files 12

Review log 56

  1. Markus Hofmann uploaded patch set 1 12/01/26, 11:06

  2. core-ci voted on patch set 1 V +1 12/01/26, 11:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/116087

  3. Markus Hofmann marked it ready for review 12/01/26, 11:20

  4. Georg Ringer commented on patch set 1 12/01/26, 12:08

    not sure if this also would need a notification center? if those are success messages of a long running task, those messages should be able to re-read if the message automatically disappears?
  5. Markus Hofmann commented on patch set 1 12/01/26, 12:12

    Reply

    Yes, good point. SHould I take care of it? And how do you think, could this be added? We currently have the notifications at the system information module, but it doesn't make sense to add these notifications there, too. What about a dedicated notification center, which also has the error count included? Or is this too much?
  6. Markus Hofmann commented on patch set 1 12/01/26, 12:21

    Reply Unresolved

    An idea about that: First, moving the error count is not a good thing, I thought about. Then, adjusting here to not delete the messages, but save a delivery time. And the notification center then gets its own feature?