I'm setting a message to core session from controller and redirect to home page Ex -
$session = Mage::getSingleton('core/session');
$session->addError('This is test message');
$this->_redirect('/');
But it's not display on home page, i checked xml files and other blocks too but can't find any clue. When i debug the message on home page phtml file it shows like this
$messages=Mage::getSingleton("core/session")->getMessages();
var_dump($messages);
object(Mage_Core_Model_Message_Collection)#77 (2) {
["_messages":protected]=> array(0) { } ["_lastAddedMessage":protected]=> object(Mage_Core_Model_Message_Error)#76 (6) {
["_type":protected]=> string(5) "error" ["_code":protected]=> string(34) "This is test message" ["_class":protected]=> string(0) "" ["_method":protected]=> string(0) ""
["_identifier":protected]=> NULL ["_isSticky":protected]=> bool(false) } }
Anyone know how to fix this issue, Thank You