Looking for some help I’m very new to Yii so bear with me. One of the first things I have been trying to do is add “flash messages”. I guess this has been asked a million times before but I’ve had no luck after Googling/searching the forum.
I added code to layouts -> main.php to look for (and print) flash messages but the message is not being displayed after the page redirects. Also tried adding code in the individual view but no change.
I have also added…
'autoUpdateFlash' => false
… to config -> main.php -> components but this has made no difference.
Does anyone have any suggestions as to what could be causing the problem? Is there someone I am missing? Using 1.1.10.
All my flash messages work perfectly when a user is logged in (through the WebUser), I see data stored in the session database table (the flash message) and it is removed after reading the flash the next request. All is good.
But, when a user is not logged in, it is not possible to set or get a Flash message. A session is created for non-loggedin users (I see a session in the database table) but the ‘data’ column is not updated with session information (e.g. Flash messages) so also on the next refresh no Flash messages can be restored from the database.
PS. the same goest when I don’t use the database for sessions but just $_SESSION. I also only works for loggedin-users.
Is this normal behaviour or am I missing something? And is this mayb the same issue as you r3d?