I've set a flash with
Yii::app()->user->setFlash('flash', array('status' => 'error', 'message' => 'failed'));
then redirect with
$this->redirect('/');
but I can't see the flash message knowing that I've rendered the flash partial
but site/index action redirect to /me/ and profiling is enabled
flash is seen on other pages that does not redirect, flash is also seen (I guess) when I disable CWebLogRoute
did I miss something ? or is there a bug somewhere ?
is it something in Yii::app()->end(); called by the redirect ?
Page 1 of 1
is it a bug or just me: flash message / redirect / CWebLogRoute
#2
Posted 06 June 2012 - 10:53 AM
Yep, you missed something ;-)
Set
http://www.yiiframew...ateFlash-detail
I don't think the default behavior is what one would expect, but it is defualt true for backwards compatibility.
Set
autoUpdateFlashto false to have flash messages valid over one or more redirects:
http://www.yiiframew...ateFlash-detail
I don't think the default behavior is what one would expect, but it is defualt true for backwards compatibility.
Share this topic:
Page 1 of 1

Help












