[BUGFIX] ElementBrowser: Show triggered flash messages 58/36958/3
authorNicole Cordes <typo3@cordes.co>
Sat, 14 Feb 2015 20:57:01 +0000 (21:57 +0100)
committerNicole Cordes <typo3@cordes.co>
Mon, 16 Feb 2015 20:13:12 +0000 (21:13 +0100)
If you try to add a new folder with empty name or an error during the
file upload happens, a FlashMessage is generated and added to the
FlashMessageQueue but not display within the ElementBrowser. The patch
adds output of the FlashMessageQueue above the navigation.

Releases: master, 6.2
Resolves: #65075
Change-Id: I9196fce917893ff04aad55a7f96c57a0b09f4fc3
Reviewed-on: http://review.typo3.org/36958
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
typo3/sysext/recordlist/Classes/Browser/ElementBrowser.php

index 3bbb3a9..1516183 100644 (file)
@@ -850,6 +850,8 @@ class ElementBrowser {
        public function main_rte($wiz = FALSE) {
                // Starting content:
                $content = $this->doc->startPage('RTE link');
+               // Add the FlashMessages if any
+               $content .= $this->doc->getFlashMessages();
 
                // Initializing the action value, possibly removing blinded values etc:
                $blindLinkOptions = isset($this->thisConfig['blindLinkOptions'])
@@ -1379,6 +1381,8 @@ class ElementBrowser {
                ');
                // Starting content:
                $content = $this->doc->startPage('TBE file selector');
+               // Add the FlashMessages if any
+               $content .= $this->doc->getFlashMessages();
                // Init variable:
                $pArr = explode('|', $this->bparams);
                // The key number 3 of the pArr contains the "allowed" string. Disallowed is not passed to
@@ -1463,8 +1467,6 @@ class ElementBrowser {
                } else {
                        $files = '';
                }
-               // Add the FlashMessages if any
-               $content .= $this->doc->getFlashMessages();
 
                // Putting the parts together, side by side:
                $content .= '
@@ -1510,6 +1512,8 @@ class ElementBrowser {
                ');
                // Starting content:
                $content = $this->doc->startPage('TBE folder selector');
+               // Add the FlashMessages if any
+               $content .= $this->doc->getFlashMessages();
                // Init variable:
                $parameters = explode('|', $this->bparams);
                if ($this->expandFolder) {