Commit 7e9ff7a4 authored by Nikita Hovratov's avatar Nikita Hovratov Committed by Stefan Bürk
Browse files

[TASK] Set FlashMessageQueue for ModuleTemplate in extbase controller

For the Module Template Layout to render FlashMessages, it
needs to hold the FlashMessageQueue with the added messages.
This needs to be done manually for extbase extensions, as
they are holding their own internal queue.

This patch also reverts the related patch #97569, which
fixed it by adding an explicit f:flashMessages VH to the
templates.

Resolves: #97717
Related: #97569
Related: #96745
Releases: main
Change-Id: I926298f303a4d0d0ffdaffa771ac7667f971b8f1
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74795

Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
parent 874d3d7b
...@@ -125,6 +125,7 @@ class BackendLogController extends ActionController ...@@ -125,6 +125,7 @@ class BackendLogController extends ActionController
return $this->moduleTemplateFactory return $this->moduleTemplateFactory
->create($this->request) ->create($this->request)
->setFlashMessageQueue($this->getFlashMessageQueue())
->setTitle(LocalizationUtility::translate('LLL:EXT:belog/Resources/Private/Language/locallang_mod.xlf:mlang_tabs_tab')) ->setTitle(LocalizationUtility::translate('LLL:EXT:belog/Resources/Private/Language/locallang_mod.xlf:mlang_tabs_tab'))
->assignMultiple($viewVariables) ->assignMultiple($viewVariables)
->renderResponse('BackendLog/List'); ->renderResponse('BackendLog/List');
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
}" }"
/> />
<f:flashMessages />
<h1> <h1>
<f:translate key="adminLog" /> <f:translate key="adminLog" />
</h1> </h1>
......
...@@ -104,6 +104,7 @@ class BackendUserController extends ActionController ...@@ -104,6 +104,7 @@ class BackendUserController extends ActionController
$this->moduleData = $this->request->getAttribute('moduleData'); $this->moduleData = $this->request->getAttribute('moduleData');
$this->moduleTemplate = $this->moduleTemplateFactory->create($this->request); $this->moduleTemplate = $this->moduleTemplateFactory->create($this->request);
$this->moduleTemplate->setTitle(LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang_mod.xlf:mlang_tabs_tab')); $this->moduleTemplate->setTitle(LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang_mod.xlf:mlang_tabs_tab'));
$this->moduleTemplate->setFlashMessageQueue($this->getFlashMessageQueue());
} }
/** /**
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
<f:layout name="Module" /> <f:layout name="Module" />
<f:section name="Content"> <f:section name="Content">
<f:flashMessages />
<h1>{f:translate(key:'compareBackendUsers')}</h1> <h1>{f:translate(key:'compareBackendUsers')}</h1>
<div class="table-fit"> <div class="table-fit">
<table id="tx_beuser_compare" class="table table-striped table-hover table-vertical-top"> <table id="tx_beuser_compare" class="table table-striped table-hover table-vertical-top">
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
<f:layout name="Module" /> <f:layout name="Module" />
<f:section name="Content"> <f:section name="Content">
<f:flashMessages />
<h1>{f:translate(key:'compareBackendUsersGroups')}</h1> <h1>{f:translate(key:'compareBackendUsersGroups')}</h1>
<div class="table-fit"> <div class="table-fit">
<table id="tx_beuser_compare" class="table table-striped table-hover table-vertical-top"> <table id="tx_beuser_compare" class="table table-striped table-hover table-vertical-top">
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
<f:layout name="Module" /> <f:layout name="Module" />
<f:section name="Content"> <f:section name="Content">
<f:flashMessages />
<h1><f:translate key="backendUserGroupListing" /></h1> <h1><f:translate key="backendUserGroupListing" /></h1>
<f:if condition="{compareGroupUidList}"> <f:if condition="{compareGroupUidList}">
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
<f:layout name="Module" /> <f:layout name="Module" />
<f:section name="Content"> <f:section name="Content">
<f:flashMessages />
<h1><f:translate key="backendUserListing" /></h1> <h1><f:translate key="backendUserListing" /></h1>
<f:comment> <f:comment>
Listing of users on compare list Listing of users on compare list
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
<f:layout name="Module" /> <f:layout name="Module" />
<f:section name="Content"> <f:section name="Content">
<f:flashMessages />
<h1><f:translate key="onlineUsers" /></h1> <h1><f:translate key="onlineUsers" /></h1>
<div class="table-fit"> <div class="table-fit">
<table class="table table-striped table-hover"> <table class="table table-striped table-hover">
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
<f:layout name="Module"/> <f:layout name="Module"/>
<f:section name="Content"> <f:section name="Content">
<f:flashMessages />
<h1><f:translate key="backendUser" />: {data.user.username} [{data.user.uid}]</h1> <h1><f:translate key="backendUser" />: {data.user.username} [{data.user.uid}]</h1>
<f:if condition="{data.user.description}"> <f:if condition="{data.user.description}">
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment