2013-12-23 17 views

回答

3

在Magento的唯一地方,錯誤字符串出現在以下try/catch塊

#File: app/code/core/Mage/Newsletter/controllers/SubscriberController.php 
try { 
    //...snip!... 
} 
catch (Mage_Core_Exception $e) { 
    $session->addException($e, $this->__('There was a problem with the subscription: %s', $e->getMessage())); 
} 
catch (Exception $e) { 
    $session->addException($e, $this->__('There was a problem with the subscription.')); 
} 

既然你報告的錯誤消息「有與訂閱的問題。」,即意味着新聞訂閱代碼正在拋出一些PHP異常的痛處,被catch (Exception $e) {塊所捕獲。 Magento不會輸出來自PHP例外的消息。如果我是你的位置,我會臨時更改異常處理程序中包含的錯誤消息

$session->addException($e, $this->__('There was a problem with the subscription. ' . $e->getMessage())); 

這將讓你追查多數民衆贊成觸發您的錯誤信息PHP的錯誤。

每下面的評論,存在異常錯誤的「從addHeader()無法設置標準頭」的地方是

#File: lib/Zend/Mail.php 
    $prohibit = array('to', 'cc', 'bcc', 'from', 'subject', 
         'reply-to', 'return-path', 
         'date', 'message-id', 
        ); 
    if (in_array(strtolower($name), $prohibit)) { 
     /** 
     * @see Zend_Mail_Exception 
     */ 
     #require_once 'Zend/Mail/Exception.php'; 
     throw new Zend_Mail_Exception('Cannot set standard header from addHeader()'); 
    } 

    $value = $this->_filterOther($value); 
    $value = $this->_encodeHeader($value); 
    $this->_storeHeader($name, $value, $append); 

    return $this; 

我的猜測是在你的系統中某人的補充,嘗試設置的一個一些自定義代碼的地方標準電子郵件標題通過addHeader方法。

+0

謝謝Alan。它返回...訂閱有問題。無法從addHeader()設置標準頭文件 – cppit

+1

@fogsy回答更新。祝你好運! –

相關問題