title: Troubleshooting Magento Contact Form
body: <p>Our contact form has stopped working, and I"m not sure what the problem is. I can confirm that other e-mails are working correctly. The weird part is that once I click submit, it returns me to <code>http://mydomain.com/contact/index/</code> and has no message. Also, if the test message looks spammy, <strong>Akismet</strong> will catch it in the Akimet section. Here is my setup:</p>
  
  <p><strong>Page with form:</strong></p>
  
  <pre><code>{{block type="core/template" name="contactForm" form_action="/contacts/index/post/" template="contacts/form.phtml"}}
  </code></pre>
  
  <p>The <strong>form.html</strong> code:</p>
  
  <pre><code>&lt;form action="&lt;?php echo $this-&gt;getFormAction();?&gt;" id="contactForm" method="post"&gt;
  &lt;div class="fieldset"&gt;
      &lt;h2 class="legend"&gt;&lt;?php echo Mage::helper('contacts')-&gt;__('Contact Information') ?&gt;&lt;/h2&gt;
      &lt;ul class="form-list"&gt;
          &lt;li class="fields"&gt;
              &lt;div class="field"&gt;
                  &lt;label for="name" class="required"&gt;&lt;em&gt;*&lt;/em&gt;&lt;?php echo Mage::helper('contacts')-&gt;__('Name') ?&gt;&lt;/label&gt;
                  &lt;div class="input-box"&gt;
                      &lt;input name="name" id="name" title="&lt;?php echo Mage::helper('contacts')-&gt;__('Name') ?&gt;" value="&lt;?php echo $this-&gt;htmlEscape($this-&gt;helper('contacts')-&gt;getUserName()) ?&gt;" class="input-text required-entry" type="text" /&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="field"&gt;
                  &lt;label for="email" class="required"&gt;&lt;em&gt;*&lt;/em&gt;&lt;?php echo Mage::helper('contacts')-&gt;__('Email') ?&gt;&lt;/label&gt;
                  &lt;div class="input-box"&gt;
                      &lt;input name="email" id="email" title="&lt;?php echo Mage::helper('contacts')-&gt;__('Email') ?&gt;" value="&lt;?php echo $this-&gt;htmlEscape($this-&gt;helper('contacts')-&gt;getUserEmail()) ?&gt;" class="input-text required-entry validate-email" type="text" /&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/li&gt;
          &lt;li&gt;
              &lt;label for="telephone"&gt;&lt;?php echo Mage::helper('contacts')-&gt;__('Telephone') ?&gt;&lt;/label&gt;
              &lt;div class="input-box"&gt;
                  &lt;input name="telephone" id="telephone" title="&lt;?php echo Mage::helper('contacts')-&gt;__('Telephone') ?&gt;" value="" class="input-text" type="text" /&gt;
              &lt;/div&gt;
          &lt;/li&gt;
          &lt;li class="wide"&gt;
              &lt;label for="reason" class="required"&gt;&lt;em&gt;*&lt;/em&gt;&lt;?php echo Mage::helper('contacts')-&gt;__('Reason') ?&gt;&lt;/label&gt;
              &lt;div class="input-box"&gt;
                  &lt;textarea name="reason" id="reason" title="&lt;?php echo Mage::helper('contacts')-&gt;__('Reason') ?&gt;" class="required-entry input-text" cols="5" rows="3"&gt;&lt;/textarea&gt;
              &lt;/div&gt;
          &lt;/li&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  &lt;div class="buttons-set"&gt;
      &lt;p class="required"&gt;&lt;?php echo Mage::helper('contacts')-&gt;__('* Required Fields') ?&gt;&lt;/p&gt;
      &lt;input type="text" name="hideit" id="hideit" value="" style="display:none !important;" /&gt;
      &lt;button type="submit" title="&lt;?php echo Mage::helper('contacts')-&gt;__('Submit') ?&gt;" class="button"&gt;&lt;span&gt;&lt;span&gt;&lt;?php echo Mage::helper('contacts')-&gt;__('Submit') ?&gt;&lt;/span&gt;&lt;/span&gt;&lt;/button&gt;
  &lt;/div&gt;
  &lt;/form&gt;
  &lt;script type="text/javascript"&gt;
  //&lt;![CDATA[
  var contactForm = new VarienForm('contactForm', true);
  //]]&gt;
  &lt;/script&gt;
  </code></pre>
  
  <p>Here are the contents of system.log:</p>
  
  <pre><code>2012-08-10T18:21:51+00:00 ERR (3): Notice: Undefined index: comment  in /var/www/html/svn/magento/website/trunk/app/code/community/Centerax/Akismet/Model/Api.php on line 56
  2012-08-10T18:21:51+00:00 ERR (3): Notice: Undefined index: comment  in /var/www/html/svn/magento/website/trunk/app/code/community/Centerax/Akismet/controllers/Contacts/IndexController.php on line 52
  </code></pre>