[bug] broken flash messages
If I use sth. like this in presenter
$this->flashMessage('test');
$this->redirect('this');
the flash message will not show up as corresponding snippet (flashes) is not set to be redrawn after forwarding.
The workaround is to check for _fid in startup method
if (!empty($this->params[self::FLASH_KEY])) {
$this->redrawControl('flashes');
}
but I lost more than hour to track this down..would be nice to mention this at least somewhere
That is not a bug. It's your responsibility to invalidate snippets. Flash messages are not tied to output in any way.
ok, I forgot that line in previous example..
$this->flashMessage('test');
$this->redrawControl('flashes');
$this->redirect('this');
after redirect the snippet is not invalidated.. (which is without this extension..)
The thing about this extension is, that if you make redirect, you make redirect :). Therefore you have to take care of this invalidation in the destination of the redirect (in the newly created app request).
after redirect the snippet is not invalidated.. (which is without this extension..)
That's true, but without this extension, this invalidated snippet is discarded immediately by actual redirect in the browser. So with this extension, you have to think about it bit different.
I see now but haven't realized when I used this extension for the first time. Now it seems obvious but it was not when I was hunting the 'bug' down :) All I'm asking is if any mention in readme of how this extension works & what to be aware of (need of snippet invalidation after 'redirect') would not be helpful for first-time users like I was..
Noted. I will try to update readme soon :).
Thx ;)