title: Custom fields are not saving in magento product review
body: <p>I am trying to add extra fields in magento product review.
  1. Good thing about product
  2. Bad thing about product</p>
  
  <p>I follow this <a href="https://stackoverflow.com/questions/10084144/add-custom-fields-in-review-form">link</a>. I have override core files into my local files.
  Here my code:</p>
  
  <blockquote>
    <p>template/review/form.phtml</p>
  </blockquote>
  
  <pre><code>&lt;li&gt;
       &lt;label for="goodthings" class="required"&gt;&lt;?php echo $this-&gt;__('Good Things') ?&gt;&lt;/label&gt;
       &lt;div class="input-box"&gt;
       &lt;textarea name="goodthings" id="goodthings" cols="5" rows="3" &gt;&lt;?php echo $this-&gt;escapeHtml($data-&gt;getGoodthings()) ?&gt;&lt;/textarea&gt;
       &lt;/div&gt;
  
  &lt;/li&gt;
  &lt;li&gt;
      &lt;label for="badthings" class="required"&gt;&lt;?php echo $this-&gt;__('Bad Things') ?&gt;&lt;/label&gt;
      &lt;div class="input-box"&gt;
      &lt;textarea name="badthings" id="badthings" cols="5" rows="3" &gt;&lt;?php echo $this-&gt;escapeHtml($data-&gt;getBadthings()) ?&gt;&lt;/textarea&gt;
       &lt;/div&gt;&lt;/li&gt;
  </code></pre>
  
  <p>and </p>
  
  <blockquote>
    <p>/local/Mage/Review/Model/Resource/Review.php</p>
  </blockquote>
  
  <pre><code>$detail = array(
              'title'     =&gt; $object-&gt;getTitle(),
              'detail'    =&gt; $object-&gt;getDetail(),
              'nickname'  =&gt; $object-&gt;getNickname(),
              'goodthing' =&gt; $object-&gt;getGoodthings(), 
              'badthing' =&gt; $object-&gt;getBadthings(),
          );
  </code></pre>
  
  <p>Database query:</p>
  
  <pre><code>ALTER TABLE  `review_detail` ADD  `goodthing` TEXT NOT NULL COMMENT  'review goodthing' AFTER  `nickname` ,
  ADD  `badthing` TEXT NOT NULL COMMENT  'review badthing' AFTER  `goodthing` ;
  </code></pre>
  
  <blockquote>
    <p>/local/Mage/Review/controllers/ProductController.php</p>
  </blockquote>
  
  <pre><code>class Mage_Review_ProductController extends Mage_Core_Controller_Front_Action
  {
  
      /**
       * Action list where need check enabled cookie
       *
       * @var array
       */
      protected $_cookieCheckActions = array('post');
  
      public function preDispatch()
      {
          parent::preDispatch();
  
          $allowGuest = Mage::helper('review')-&gt;getIsGuestAllowToWrite();
          if (!$this-&gt;getRequest()-&gt;isDispatched()) {
              return;
          }
  
          $action = strtolower($this-&gt;getRequest()-&gt;getActionName());
          if (!$allowGuest &amp;&amp; $action == 'post' &amp;&amp; $this-&gt;getRequest()-&gt;isPost()) {
              if (!Mage::getSingleton('customer/session')-&gt;isLoggedIn()) {
                  $this-&gt;setFlag('', self::FLAG_NO_DISPATCH, true);
                  Mage::getSingleton('customer/session')-&gt;setBeforeAuthUrl(Mage::getUrl('*/*/*', array('_current' =&gt; true)));
                  Mage::getSingleton('review/session')-&gt;setFormData($this-&gt;getRequest()-&gt;getPost())
                      -&gt;setRedirectUrl($this-&gt;_getRefererUrl());
                  $this-&gt;_redirectUrl(Mage::helper('customer')-&gt;getLoginUrl());
              }
          }
  
          return $this;
      }
      /**
       * Initialize and check product
       *
       * @return Mage_Catalog_Model_Product
       */
      protected function _initProduct()
      {
          Mage::dispatchEvent('review_controller_product_init_before', array('controller_action'=&gt;$this));
          $categoryId = (int) $this-&gt;getRequest()-&gt;getParam('category', false);
          $productId  = (int) $this-&gt;getRequest()-&gt;getParam('id');
  
          $product = $this-&gt;_loadProduct($productId);
          if (!$product) {
              return false;
          }
  
          if ($categoryId) {
              $category = Mage::getModel('catalog/category')-&gt;load($categoryId);
              Mage::register('current_category', $category);
          }
  
          try {
              Mage::dispatchEvent('review_controller_product_init', array('product'=&gt;$product));
              Mage::dispatchEvent('review_controller_product_init_after', array(
                  'product'           =&gt; $product,
                  'controller_action' =&gt; $this
              ));
          } catch (Mage_Core_Exception $e) {
              Mage::logException($e);
              return false;
          }
  
          return $product;
      }
  
      /**
       * Load product model with data by passed id.
       * Return false if product was not loaded or has incorrect status.
       *
       * @param int $productId
       * @return bool|Mage_Catalog_Model_Product
       */
      protected function _loadProduct($productId)
      {
          if (!$productId) {
              return false;
          }
  
          $product = Mage::getModel('catalog/product')
              -&gt;setStoreId(Mage::app()-&gt;getStore()-&gt;getId())
              -&gt;load($productId);
          /* @var $product Mage_Catalog_Model_Product */
          if (!$product-&gt;getId() || !$product-&gt;isVisibleInCatalog() || !$product-&gt;isVisibleInSiteVisibility()) {
              return false;
          }
  
          Mage::register('current_product', $product);
          Mage::register('product', $product);
  
          return $product;
      }
  
      /**
       * Load review model with data by passed id.
       * Return false if review was not loaded or review is not approved.
       *
       * @param int $productId
       * @return bool|Mage_Review_Model_Review
       */
      protected function _loadReview($reviewId)
      {
          if (!$reviewId) {
              return false;
          }
  
          $review = Mage::getModel('review/review')-&gt;load($reviewId);
          /* @var $review Mage_Review_Model_Review */
          if (!$review-&gt;getId() || !$review-&gt;isApproved() || !$review-&gt;isAvailableOnStore(Mage::app()-&gt;getStore())) {
              return false;
          }
  
          Mage::register('current_review', $review);
  
          return $review;
      }
  
      /**
       * Submit new review action
       *
       */
      public function postAction()
      {
          if (!$this-&gt;_validateFormKey()) {
              // returns to the product item page
              $this-&gt;_redirectReferer();
              return;
          }
  
          if ($data = Mage::getSingleton('review/session')-&gt;getFormData(true)) {
              $rating = array();
              if (isset($data['ratings']) &amp;&amp; is_array($data['ratings'])) {
                  $rating = $data['ratings'];
              }
          } else {
              $data   = $this-&gt;getRequest()-&gt;getPost();
              $rating = $this-&gt;getRequest()-&gt;getParam('ratings', array());
          }
  
          if (($product = $this-&gt;_initProduct()) &amp;&amp; !empty($data)) {
              $session = Mage::getSingleton('core/session');
              /* @var $session Mage_Core_Model_Session */
              $review = Mage::getModel('review/review')-&gt;setData($this-&gt;_cropReviewData($data));
              /* @var $review Mage_Review_Model_Review */
  
              $validate = $review-&gt;validate();
              if ($validate === true) {
                  try {
                      $review-&gt;setEntityId($review-&gt;getEntityIdByCode(Mage_Review_Model_Review::ENTITY_PRODUCT_CODE))
                          -&gt;setEntityPkValue($product-&gt;getId())
                          -&gt;setStatusId(Mage_Review_Model_Review::STATUS_PENDING)
                          -&gt;setCustomerId(Mage::getSingleton('customer/session')-&gt;getCustomerId())
                          -&gt;setStoreId(Mage::app()-&gt;getStore()-&gt;getId())
                          -&gt;setStores(array(Mage::app()-&gt;getStore()-&gt;getId()))
                          -&gt;save();
  
                      foreach ($rating as $ratingId =&gt; $optionId) {
                          Mage::getModel('rating/rating')
                          -&gt;setRatingId($ratingId)
                          -&gt;setReviewId($review-&gt;getId())
                          -&gt;setCustomerId(Mage::getSingleton('customer/session')-&gt;getCustomerId())
                          -&gt;addOptionVote($optionId, $product-&gt;getId());
                      }
  
                      $review-&gt;aggregate();
                      $session-&gt;addSuccess($this-&gt;__('Your review has been accepted for moderation.'));
                  }
                  catch (Exception $e) {
                      $session-&gt;setFormData($data);
                      $session-&gt;addError($this-&gt;__('Unable to post the review.'));
                  }
              }
              else {
                  $session-&gt;setFormData($data);
                  if (is_array($validate)) {
                      foreach ($validate as $errorMessage) {
                          $session-&gt;addError($errorMessage);
                      }
                  }
                  else {
                      $session-&gt;addError($this-&gt;__('Unable to post the review.'));
                  }
              }
          }
  
          if ($redirectUrl = Mage::getSingleton('review/session')-&gt;getRedirectUrl(true)) {
              $this-&gt;_redirectUrl($redirectUrl);
              return;
          }
          $this-&gt;_redirectReferer();
      }
  
      /**
       * Show list of product's reviews
       *
       */
      public function listAction()
      {
          if ($product = $this-&gt;_initProduct()) {
              Mage::register('productId', $product-&gt;getId());
  
              $design = Mage::getSingleton('catalog/design');
              $settings = $design-&gt;getDesignSettings($product);
              if ($settings-&gt;getCustomDesign()) {
                  $design-&gt;applyCustomDesign($settings-&gt;getCustomDesign());
              }
              $this-&gt;_initProductLayout($product);
  
              // update breadcrumbs
              if ($breadcrumbsBlock = $this-&gt;getLayout()-&gt;getBlock('breadcrumbs')) {
                  $breadcrumbsBlock-&gt;addCrumb('product', array(
                      'label'    =&gt; $product-&gt;getName(),
                      'link'     =&gt; $product-&gt;getProductUrl(),
                      'readonly' =&gt; true,
                  ));
                  $breadcrumbsBlock-&gt;addCrumb('reviews', array('label' =&gt; Mage::helper('review')-&gt;__('Product Reviews')));
              }
  
              $this-&gt;renderLayout();
          } elseif (!$this-&gt;getResponse()-&gt;isRedirect()) {
              $this-&gt;_forward('noRoute');
          }
      }
  
      /**
       * Show details of one review
       *
       */
      public function viewAction()
      {
          $review = $this-&gt;_loadReview((int) $this-&gt;getRequest()-&gt;getParam('id'));
          if (!$review) {
              $this-&gt;_forward('noroute');
              return;
          }
  
          $product = $this-&gt;_loadProduct($review-&gt;getEntityPkValue());
          if (!$product) {
              $this-&gt;_forward('noroute');
              return;
          }
  
          $this-&gt;loadLayout();
          $this-&gt;_initLayoutMessages('review/session');
          $this-&gt;_initLayoutMessages('catalog/session');
          $this-&gt;renderLayout();
      }
  
      /**
       * Load specific layout handles by product type id
       *
       */
      protected function _initProductLayout($product)
      {
          $update = $this-&gt;getLayout()-&gt;getUpdate();
  
          $update-&gt;addHandle('default');
          $this-&gt;addActionLayoutHandles();
  
  
          $update-&gt;addHandle('PRODUCT_TYPE_'.$product-&gt;getTypeId());
  
          if ($product-&gt;getPageLayout()) {
              $this-&gt;getLayout()-&gt;helper('page/layout')
                  -&gt;applyHandle($product-&gt;getPageLayout());
          }
  
          $this-&gt;loadLayoutUpdates();
          if ($product-&gt;getPageLayout()) {
              $this-&gt;getLayout()-&gt;helper('page/layout')
                  -&gt;applyTemplate($product-&gt;getPageLayout());
          }
          $update-&gt;addUpdate($product-&gt;getCustomLayoutUpdate());
          $this-&gt;generateLayoutXml()-&gt;generateLayoutBlocks();
      }
  
      /**
       * Crops POST values
       * @param array $reviewData
       * @return array
       */
      protected function _cropReviewData(array $reviewData)
      {
          $croppedValues = array();
          $allowedKeys = array_fill_keys(array('detail', 'title', 'nickname','goodthings','badthings'), true);
  
          foreach ($reviewData as $key =&gt; $value) {
              if (isset($allowedKeys[$key])) {
                  $croppedValues[$key] = $value;
              }
          }
  
          return $croppedValues;
      }
  }
  </code></pre>
  
  <p>form after submit not saving value of custom fields but default field are saving to database, i have tried to debug with <code>Mage::log();</code> and i am getting value for all fields in my controller on submit but not getting in Model and no log print in my Model.</p>