Flash Messages Does't Works

Hi …

I spent few hours to find solution for this but with no success!

I’m implementing this code from this tutorial, but setFlash won’t works … WHY !!



You can try the extension userflash instead.

Hey What things have you tried? I had some issues with the flash messages. Can you post any code samples and I can try dig up my solution that worked for me.


I will give you a list of the things I did to get it to work. Hope it helps.

In my _form.php partial view file I had his code near the top. I have included the line

<div class="form">

so you can see where abouts.


foreach(Yii::app()->user->getFlashes() as $key => $message) {

	echo '<div class="flash-' . $key . '">' . $message . "</div>\n";






	'$(".flash-success").animate({opacity: 1.0}, 60000).fadeOut("slow");',




<div class="form">

[b]In my controller under actionCreate and actionUpdate I had:


Yii::app()->user->setFlash('notice', "<b>Please note</b>: blah blah blah...");



This worked for me, hope it helps!