2015-06-02 36 views
0

我有一個magento商店。當我從管理員轉到「銷售>貨件」時。這裏列出所有貨物。當我點擊「查看」鏈接查看任何訂單的發貨信息時,它會給出錯誤信息。它顯示爲錯誤 -找不到日期部分。 Zend_Date - > _ calculate('set',false,NULL,'en_US')在Magento

a:5:{i:0;s:25:"No date part in '' found.";i:1;s:5882:"#0 E:\Php Projects\BulkSms\app\code\core\Zend\Date.php(1091): Zend_Date->_calculate('set', false, NULL, 'en_US') 
#1 E:\Php Projects\BulkSms\app\code\core\Zend\Date.php(210): Zend_Date->set(false, NULL, 'en_US') 
#2 E:\Php Projects\BulkSms\app\code\core\Mage\Core\Model\Locale.php(516): Zend_Date->__construct(false, NULL, Object(Zend_Locale)) 
#3 E:\Php Projects\BulkSms\app\code\core\Mage\Sales\Model\Abstract.php(82): Mage_Core_Model_Locale->storeDate(Object(Mage_Core_Model_Store), false, true) 
#4 E:\Php Projects\BulkSms\app\design\adminhtml\default\default\template\sales\order\view\info.phtml(30): Mage_Sales_Model_Abstract->getCreatedAtStoreDate() 
#5 E:\Php Projects\BulkSms\app\code\core\Mage\Core\Block\Template.php(241): include('E:\Php Projects...') 
#6 E:\Php Projects\BulkSms\app\code\core\Mage\Core\Block\Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml\defau...') 
#7 E:\Php Projects\BulkSms\app\code\core\Mage\Core\Block\Template.php(286): Mage_Core_Block_Template->renderView() 
#8 E:\Php Projects\BulkSms\app\code\core\Mage\Adminhtml\Block\Template.php(81): Mage_Core_Block_Template->_toHtml() 
#9 E:\Php Projects\BulkSms\app\code\core\Mage\Core\Block\Abstract.php(863): Mage_Adminhtml_Block_Template->_toHtml() 
#10 E:\Php Projects\BulkSms\app\code\core\Mage\Core\Block\Abstract.php(582): Mage_Core_Block_Abstract->toHtml() 
#11 E:\Php Projects\BulkSms\app\code\core\Mage\Core\Block\Abstract.php(526): Mage_Core_Block_Abstract->_getChildHtml('order_info', true) 
#12 E:\Php Projects\BulkSms\app\design\adminhtml\default\default\template\sales\order\shipment\view\form.phtml(28): Mage_Core_Block_Abstract->getChildHtml('order_info') 
#13 E:\Php Projects\BulkSms\app\code\core\Mage\Core\Block\Template.php(241): include('E:\Php Projects...') 
#14 E:\Php Projects\BulkSms\app\code\core\Mage\Core\Block\Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml\defau...') 
#15 E:\Php Projects\BulkSms\app\code\core\Mage\Core\Block\Template.php(286): Mage_Core_Block_Template->renderView() 
#16 E:\Php Projects\BulkSms\app\code\core\Mage\Adminhtml\Block\Template.php(81): Mage_Core_Block_Template->_toHtml() 
#17 E:\Php Projects\BulkSms\app\code\core\Mage\Core\Block\Abstract.php(863): Mage_Adminhtml_Block_Template->_toHtml() 
#18 E:\Php Projects\BulkSms\app\code\core\Mage\Core\Block\Abstract.php(582): Mage_Core_Block_Abstract->toHtml() 
#19 E:\Php Projects\BulkSms\app\code\core\Mage\Core\Block\Abstract.php(526): Mage_Core_Block_Abstract->_getChildHtml('form', true) 
#20 E:\Php Projects\BulkSms\app\code\core\Mage\Adminhtml\Block\Widget\Form\Container.php(130): Mage_Core_Block_Abstract->getChildHtml('form') 
#21 E:\Php Projects\BulkSms\app\design\adminhtml\default\default\template\widget\form\container.phtml(37): Mage_Adminhtml_Block_Widget_Form_Container->getFormHtml() 
#22 E:\Php Projects\BulkSms\app\code\core\Mage\Core\Block\Template.php(241): include('E:\Php Projects...') 
#23 E:\Php Projects\BulkSms\app\code\core\Mage\Core\Block\Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml\defau...') 
#24 E:\Php Projects\BulkSms\app\code\core\Mage\Core\Block\Template.php(286): Mage_Core_Block_Template->renderView() 
#25 E:\Php Projects\BulkSms\app\code\core\Mage\Adminhtml\Block\Template.php(81): Mage_Core_Block_Template->_toHtml() 
#26 E:\Php Projects\BulkSms\app\code\core\Mage\Adminhtml\Block\Widget\Container.php(308): Mage_Adminhtml_Block_Template->_toHtml() 
#27 E:\Php Projects\BulkSms\app\code\core\Mage\Core\Block\Abstract.php(863): Mage_Adminhtml_Block_Widget_Container->_toHtml() 
#28 E:\Php Projects\BulkSms\app\code\core\Mage\Core\Block\Text\List.php(43): Mage_Core_Block_Abstract->toHtml() 
#29 E:\Php Projects\BulkSms\app\code\core\Mage\Core\Block\Abstract.php(863): Mage_Core_Block_Text_List->_toHtml() 
#30 E:\Php Projects\BulkSms\app\code\core\Mage\Core\Block\Abstract.php(582): Mage_Core_Block_Abstract->toHtml() 
#31 E:\Php Projects\BulkSms\app\code\core\Mage\Core\Block\Abstract.php(526): Mage_Core_Block_Abstract->_getChildHtml('content', true) 
#32 E:\Php Projects\BulkSms\app\design\adminhtml\default\default\template\page.phtml(74): Mage_Core_Block_Abstract->getChildHtml('content') 
#33 E:\Php Projects\BulkSms\app\code\core\Mage\Core\Block\Template.php(241): include('E:\Php Projects...') 
#34 E:\Php Projects\BulkSms\app\code\core\Mage\Core\Block\Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml\defau...') 
#35 E:\Php Projects\BulkSms\app\code\core\Mage\Core\Block\Template.php(286): Mage_Core_Block_Template->renderView() 
#36 E:\Php Projects\BulkSms\app\code\core\Mage\Adminhtml\Block\Template.php(81): Mage_Core_Block_Template->_toHtml() 
#37 E:\Php Projects\BulkSms\app\code\core\Mage\Core\Block\Abstract.php(863): Mage_Adminhtml_Block_Template->_toHtml() 
#38 E:\Php Projects\BulkSms\app\code\core\Mage\Core\Model\Layout.php(555): Mage_Core_Block_Abstract->toHtml() 
#39 E:\Php Projects\BulkSms\app\code\core\Mage\Core\Controller\Varien\Action.php(390): Mage_Core_Model_Layout->getOutput() 
#40 E:\Php Projects\BulkSms\app\code\core\Mage\Adminhtml\controllers\Sales\Order\ShipmentController.php(137): Mage_Core_Controller_Varien_Action->renderLayout() 
#41 E:\Php Projects\BulkSms\app\code\core\Mage\Core\Controller\Varien\Action.php(419): Mage_Adminhtml_Sales_Order_ShipmentController->viewAction() 
#42 E:\Php Projects\BulkSms\app\code\core\Mage\Core\Controller\Varien\Router\Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('view') 
#43 E:\Php Projects\BulkSms\app\code\core\Mage\Core\Controller\Varien\Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http)) 
#44 E:\Php Projects\BulkSms\app\code\core\Mage\Core\Model\App.php(354): Mage_Core_Controller_Varien_Front->dispatch() 
#45 E:\Php Projects\BulkSms\app\Mage.php(683): Mage_Core_Model_App->run(Array) 
#46 E:\Php Projects\BulkSms\index.php(87): Mage::run('', 'store') 
#47 {main}";s:3:"url";s:88:"/index.php/admin/sales_shipment/view/shipment_id/3/key/f26c45267fe7eefcea518b47f3bb1903/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:5:"admin";} 

我該如何刪除此錯誤。

+0

請接受答案,如果你覺得有幫助 –

回答

0

當您在

private static function _parseDate($date, $options) 
     { 
.......... 
// split number parts 
    $split = false; 
    preg_match_all('/\d+/u', $number, $splitted); 

    if (count($splitted[0]) == 0) { 
     iconv_set_encoding('internal_encoding', $oenc); 
     #require_once 'Zend/Locale/Exception.php'; 
     throw new Zend_Locale_Exception("No date part in '$date' found."); // your error comes from here 

    } 

} 

lib\Zend\Locale\Format.php

我想以後有點調試發現pcre_match_all功能未能找到任何匹配。

我認爲這pcre_match_all功能正在接收non-utf8編碼的文本,並與/u選項正則表達式無法正確解析字符串。

我建議只是調試代碼,並試圖找到解決方案

+0

你好Keyul,謝謝你的回覆。我去建議的文件,並將此代碼調試指定的位置。 '$ split = false; Mage :: log('Number',$ number); preg_match_all('/ \ d +/u',$ number,$ splitted); Mage :: log('Number',$ number); Mage :: log('splitted',$ splitted); 並得到這在日誌文件。 DEBUG(7):拆分 警告:isset中的非法偏移類型或344中的E:\ Php Projects \ BulkSms \ lib \ Zend \ Log.php中的空值 ERR(3):Notice:Undefined variable:splitted in E :\ Php Projects \ BulkSms \ lib \ Zend \ Locale \ Format.php行865 – shashank

+0

接受答案,如果你覺得有用@shashank –

0

嘗試添加的$數的驗證。有時候它是空的。

if (!empty($number) && count($splitted[0]) == 0) { 
    self::_setEncoding($oenc); 
    #require_once 'Zend/Locale/Exception.php'; 
    throw new Zend_Locale_Exception("No date part in '$date' found."); 
}