title: adminhtml/session in Magento addError not showing after redirect
body: <p>I am working on a custom magento admin module with grids. When you add a new entry, I perform custom validation and throw an error (when &amp; if it occurs) using <code>Mage::getSingleton('adminhtml/session')-&gt;addError()</code> method.</p>
  
  <p>The error message I set does not appear, when I redirect back to the edit form.</p>
  
  <p>This is my <code>save</code> action on the grid controller:</p>
  
  <pre><code>public function saveAction()
  {
      // Look For HTTP Post
      if ($data = $this-&gt;getRequest()-&gt;getPost())
      {
          // Load Data
          $manualOrderSyncModel = Mage::getModel('mycompany_mymodule/manualordersync')
              -&gt;setData($data)
              -&gt;setId($this-&gt;getRequest()-&gt;getParam('id'));
  
          // Anticipate Errors
          try
          {
              // Get If Order Number Is Valid
              $order = Mage::getModel('sales/order')-&gt;load($manualOrderSyncModel-&gt;getOrderNumber(), 'increment_id');
              if (null === $order-&gt;getId())
                  throw new Exception('No such order exists in the system. Check that order number.');
  
              // Check If This Order Already Exists In Queue
              $existingManualOrderSyncModel = Mage::getModel('mycompany_mymodule/manualordersync')
                  -&gt;load($manualOrderSyncModel-&gt;getOrderNumber(), 'order_number');
              if (null !== $existingManualOrderSyncModel-&gt;getId())
              {
                  // Update Existing Entry
                  $existingManualOrderSyncModel
                      -&gt;setCreatedAt(now())
                      -&gt;setCreatedBy(Mage::getSingleton('admin/session')-&gt;getUser()-&gt;getUsername())
                      -&gt;setIsSynced(Mycompany_Mymodule_Model_Yesno::NO)
                      -&gt;save();
              }
              else
              {
                  // Update Timestamps
                  if ($manualOrderSyncModel-&gt;getCreatedAt() == NULL) {
                      $manualOrderSyncModel
                          -&gt;setCreatedAt(now())
                          -&gt;setCreatedBy(Mage::getSingleton('admin/session')-&gt;getUser()-&gt;getUsername());
                  }
                  $manualOrderSyncModel-&gt;save();
              }
  
              // Set Success
              Mage::getSingleton('adminhtml/session')-&gt;addSuccess($this-&gt;__('Manual order sync updated.'));
              Mage::getSingleton('adminhtml/session')-&gt;setManualordersyncData(false);
  
              // Handle Redirect
              $this-&gt;_redirect('*/*/');
              return;
          }
          catch (Exception $e)
          {
              // Error
              Mage::getSingleton('adminhtml/session')-&gt;addError($e-&gt;getMessage());
              Mage::getSingleton('adminhtml/session')-&gt;setManualordersyncData($data);
              $this-&gt;_redirect('*/*/edit', array('id' =&gt; $this-&gt;getRequest()-&gt;getParam('id')));
              return;
          }
      }
  
      // Error
      Mage::getSingleton('adminhtml/session')-&gt;addError($this-&gt;__('Invalid request - unable to find manual order sync to save.'));
      $this-&gt;_redirect('*/*/');
  }
  </code></pre>
  
  <p>I have noticed, the issue only occurs when I do this:</p>
  
  <pre><code>// Error
  Mage::getSingleton('adminhtml/session')-&gt;addError($e-&gt;getMessage());
  Mage::getSingleton('adminhtml/session')-&gt;setManualordersyncData($data);
  $this-&gt;_redirect('*/*/edit', array('id' =&gt; $this-&gt;getRequest()-&gt;getParam('id')));
  return;
  </code></pre>
  
  <p>However, If set error and redirect back to grid like this, the error message shows:</p>
  
  <pre><code>// Error
  Mage::getSingleton('adminhtml/session')-&gt;addError($e-&gt;getMessage());
  Mage::getSingleton('adminhtml/session')-&gt;setManualordersyncData($data);
  $this-&gt;_redirect('*/*/');
  return;
  </code></pre>
  
  <p>This is not ideal because I am no longer in the edit form and I have lost the <code>old data</code> from the form. Any ideas on how to fix this?</p>