[TYPO3-mvc] Using renderFlashMessages leads to fatal error if no BE session active

Kevin Ulrich Moschallski km at 3digit.de
Wed Jan 12 14:30:39 CET 2011


Hi Jochen,

i also get this error. This seems to be fixed in trunk.

self::getUserByContext()->setAndSaveSessionData('core.template.flashMessages', 
$flashMessages);

 /**
         * Gets user object by context
         *
         * @return object user object
         */
        protected static function getUserByContext() {
                return TYPO3_MODE === 'BE' ? $GLOBALS['BE_USER'] : 
$GLOBALS['TSFE']->fe_user;
        }

Regards,
Kevin
On 2011-01-12 14:16:16 +0100, Jochen Rieger said:

> Hi all,
> 
> if I put the fluid ViewHelper for flash messages into a fluid template 
> it leads to a fatal error.
> 
> <f:renderFlashMessages /> leads to:
> 
> Fatal error: Call to a member function getSessionData() on a non-object 
> in 
> /var/www/typo3/typo3_src-4.4.5/t3lib/class.t3lib_flashmessagequeue.php 
> on line 100
> 
> The problem does not occur as soon as I am logged in to the backend and 
> $GLOBALS['BE_USER'] exists.
> 
> I am using TYOP3 4.4.5 and a trunk version (around beta3) of extbase / fluid.
> 
> Anybody encountered this problem already?
> 
> Regards,
> Jochen




More information about the TYPO3-project-typo3v4mvc mailing list