Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using magento 1.8. I have custom theme. I am unable to get newsletter error/success messages when customer submit their email-id for subscription.

I have done many changes to get and print messages. But it won't work.

I am getting messages by below code

$messages = Mage::getSingleton('core/session')->getMessages(true);
    echo "<pre>"; var_dump($messages);

object(Mage_Core_Model_Message_Collection)#281 (2) {
  array(0) {
  object(Mage_Core_Model_Message_Error)#120 (6) {
    string(5) "error"
    string(102) "Il y a eu un problème lors de l'inscription : This email address is already assigned to another user."
    string(0) ""
    string(0) ""

But I am unable to print it. I have tried below code.

   foreach($messages->getItems() as $message) {
        echo $message->getText();

Even I am not getting any thing in forloop. Help me,, Thanks in advance:)

share|improve this question
up vote 5 down vote accepted

You can print the messages in a template like this:

<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>

But there is a catch.
For example the newsletter subscription message is added to Mage::getSingleton('core/session').
So in order to see te core/session messages you need to add this in the controller that renders the template:


after calling

share|improve this answer
Wow, good to know, thanks! I always thought it is a core bug, that only core/session is rendered! :D – Fabian Blechschmidt Aug 21 '14 at 8:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.