Hi guys

In Yii 1 I could set autoUpdateFlash to false in config. This doesn’t seem to be available in Yii 2.

Is there another way of getting Flash messages to persist beyond the second request?

This was a really useful feature in Yii 1!


This is not supported in Yii2. You may create a feature request on github.

Though not directly through built in methods in Yii2… couple of workable options…


[*]You may create your own method to read the session flash instead of using the built in getFlash method (which unsets the session variable).

[*]Instead of setFlash method… you could directly create/use any other session variable to store such messages and manually unset them when you desire.


Great, good to know. Thanks for getting back and for the tips!