[TYPO3-mvc] Flash Messages get persisted among page hits

Franz Koch typo3.RemoveForMessage at elements-net.de
Fri Feb 12 18:05:14 CET 2010


Hi,

one thing that bugged me for some debugg-sessions where the flash 
messages - and I think there's something really wrong in their handling.

In my current project I don't output flash messages on every page. One 
page they get displayed, and I randomly had strange FlashMessages 
showing up there. Those where error messages that a certain action of my 
controller could not be executed properly etc. Then I started debugging 
but didn't find the cause. On next hit the error was gone and I didn't 
care any more. That happend several times.

Today I had again a flashMessage on that mentioned page, but strangely 
from a controller that's not even used on this page.
So I come to the conclusion that flashMessages get stored/persisted in 
the current session and do only get flushed after they got printed once. 
So if you're browsing 10 pages with errors but don't render them on 
those pages, you get all messages collected and rendered on the first 
occasion.

I think this is a bug. The FlashMessage stack should be cleared at every 
page hit, so that I only see messages related to the current actions. 
Can anybody confirm this strange behavior and also call this a bug?

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list