Q:

Overridden Controller in Magento, One Function not working

Im attempting to get my contact form to redirect to the homepage after form submission. I setup my module and can confirm it is working. In the code below, I get the 'Pre-dispatched' and 'Index Action' log messages but do not get the 'Post Action' and as you can expect, it also does not redirect me to the homepage when it is complete. I do receive the contact e-mail properly. Can anyone tell me why the first two functions are working correctly and postAction() is not?
I copied all of the code from the original controller into my controller for troubleshooting purposes. Everything is default except the addition of log messages and the redirects at the bottom.
class MyCompany_Contacts_IndexController extends Mage_Contacts_IndexController
{   
const XML_PATH_EMAIL_RECIPIENT  = 'contacts/email/recipient_email';
const XML_PATH_EMAIL_SENDER     = 'contacts/email/sender_email_identity';
const XML_PATH_EMAIL_TEMPLATE   = 'contacts/email/email_template';
const XML_PATH_ENABLED          = 'contacts/contacts/enabled';

public function preDispatch()
{
    parent::preDispatch();
    Mage::log('Pre-dispatched');

    if( !Mage::getStoreConfigFlag(self::XML_PATH_ENABLED) ) {
        $this->norouteAction();
    }
}

public function indexAction()
{
    Mage::log('Index Action.');
    $this->loadLayout();
    $this->getLayout()->getBlock('contactForm')
        ->setFormAction( Mage::getUrl('*/*/post') );

    $this->_initLayoutMessages('customer/session');
    $this->_initLayoutMessages('catalog/session');
    $this->renderLayout();
}

public function postAction()
{
    parent::postAction();
    Mage::log('Post Action.');
    $post = $this->getRequest()->getPost();
    if ( $post ) {
        $translate = Mage::getSingleton('core/translate');
        /* @var $translate Mage_Core_Model_Translate */
        $translate->setTranslateInline(false);
        try {
            $postObject = new Varien_Object();
            $postObject->setData($post);

            $error = false;

            if (!Zend_Validate::is(trim($post['name']) , 'NotEmpty')) {
                $error = true;
            }

            if (!Zend_Validate::is(trim($post['comment']) , 'NotEmpty')) {
                $error = true;
            }

            if (!Zend_Validate::is(trim($post['email']), 'EmailAddress')) {
                $error = true;
            }

            if (Zend_Validate::is(trim($post['hideit']), 'NotEmpty')) {
                $error = true;
            }

            if ($error) {
                throw new Exception();
            }
            $mailTemplate = Mage::getModel('core/email_template');
            /* @var $mailTemplate Mage_Core_Model_Email_Template */
            $mailTemplate->setDesignConfig(array('area' => 'frontend'))
                ->setReplyTo($post['email'])
                ->sendTransactional(
                    Mage::getStoreConfig(self::XML_PATH_EMAIL_TEMPLATE),
                    Mage::getStoreConfig(self::XML_PATH_EMAIL_SENDER),
                    Mage::getStoreConfig(self::XML_PATH_EMAIL_RECIPIENT),
                    null,
                    array('data' => $postObject)
                );

            if (!$mailTemplate->getSentSuccess()) {
                throw new Exception();
            }

            $translate->setTranslateInline(true);

           // Mage::getSingleton('customer/session')->addSuccess(Mage::helper('contacts')->__('Your inquiry was submitted and will be responded to as soon as possible. Thank you for contacting us.'));
            $this->_redirect('');

            return;
        } catch (Exception $e) {
            $translate->setTranslateInline(true);

           // Mage::getSingleton('customer/session')->addError(Mage::helper('contacts')->__('Unable to submit your request. Please, try again later'));
            $this->_redirect('');
            return;
        }

    } else {
        $this->_redirect('');
    }
}

}

config.xml
<?xml version="1.0" encoding="UTF-8"?>
<config>
  <modules>
    <MyCompany_Contacts>
        <version>0.0.1</version>
    </MyCompany_Contacts>
  </modules>

  <frontend>
    <routers>
      <contacts>
        <args>
          <modules>
              <MyCompany_Contacts before="Mage_Contacts">MyCompany_Contacts</MyCompany_Contacts>
          </modules>
        </args>
      </contacts>
    </routers>
  </frontend>
</config>

A:

I think I figured this out. I remmebered that the post data gets analyzed by Akismet before it gets sent so its entirely possible the default Mage_Contacts is already getting extended and is going trough that module first. Added the logging to postAction() in the Akismet controller and that verified it. Thanks for setting me on the right track. 

