Skip to content

Commit

Permalink
[BUGFIX] Use own FlashMessage
Browse files Browse the repository at this point in the history
TemplateView has no ModuleTemplate anymore, so use own FlashMessage function.

Release: 11.0.0
Related: #497
  • Loading branch information
opi99 committed Sep 20, 2023
1 parent e30c2a5 commit 5f2fb96
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Classes/Controller/Backend/Handler/DoktypeDefaultHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ public function handle(PageLayoutController $controller, array $pageRecord)
}

if (!$combinedMappingConfigurationIdentifier) {
$controller->getView()->getModuleTemplate()->addFlashMessage(
$controller->addFlashMessage(
'No mapping configuration found for this page. Please edit the page properties and select one.',
'No mapping configuration found',
\TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR,
false
);
if (!empty($pageRecord['tx_templavoilaplus_ds']) || !empty($pageRecord['tx_templavoilaplus_next_ds'])) {
$controller->getView()->getModuleTemplate()->addFlashMessage(
$controller->addFlashMessage(
'Older configuration found. Did you upgrade to "TemplaVoilà! Plus 8" but forgot to run the upgrade scripts?',
'Did you forget to Upgrade',
\TYPO3\CMS\Core\Messaging\AbstractMessage::WARNING,
Expand Down Expand Up @@ -101,7 +101,7 @@ public function handle(PageLayoutController $controller, array $pageRecord)
$controller->addContentPartial('body', 'Backend/Handler/DoktypeDefaultHandler');
// @TODO Add them automagically in controller to harden naming?
} catch (ConfigurationException $e) {
$controller->getView()->getModuleTemplate()->addFlashMessage(
$controller->addFlashMessage(
'The page has a layout defined, which seems to be missing on this system. The error was: ' . $e->getMessage(),
'Template Configuration not loadable',
\TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR,
Expand Down

0 comments on commit 5f2fb96

Please sign in to comment.