is it a bug or just me: flash message / redirect / CWebLogRoute

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 ?

Yep, you missed something :wink:

Set


autoUpdateFlash

to false to have flash messages valid over one or more redirects:

http://www.yiiframework.com/doc/api/1.1/CWebUser#autoUpdateFlash-detail

I don’t think the default behavior is what one would expect, but it is defualt true for backwards compatibility.

thank you very much, is there any expected side effects ?