从 Magento 后端编辑客户时出现错误
我突然开始无缘无故地遇到这个错误,需要一些帮助。
在我的“管理客户”部分中,每当我添加新客户时,它都会显示良好,所有值都正确。但每当我尝试编辑新添加的客户时,我都会在 Magento 中收到错误页面。
处理您的请求时出错。
后来,当我返回“管理客户”网格时,该客户记录的“客户自”列更改为该值“30 Nov -1 01:00:00”
因此,有人知道可能会出现什么问题吗?那里?
这是 var/report 文件夹中的错误,
a:5:{i:0;s:25:"No date part in '' found.";i:1;s:4432:"#0 /home/wpfsl/public_html/lib/Zend/Date.php(1078): Zend_Date->_calculate('set', false, NULL, 'en_GB')
#1 /home/wpfsl/public_html/lib/Zend/Date.php(197): Zend_Date->set(false, NULL, 'en_GB')
#2 /home/wpfsl/public_html/app/code/core/Mage/Core/Model/Locale.php(478): Zend_Date->__construct(false, NULL, Object(Zend_Locale))
#3 /home/wpfsl/public_html/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View.php(76): Mage_Core_Model_Locale->date(false)
#4 /home/wpfsl/public_html/app/design/adminhtml/default/default/template/customer/tab/view.phtml(36): Mage_Adminhtml_Block_Customer_Edit_Tab_View->getCreateDate()
#5 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/wpfsl/pub...')
#6 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#7 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#8 /home/wpfsl/public_html/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#9 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Adminhtml_Block_Template->_toHtml()
#10 /home/wpfsl/public_html/app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php(303): Mage_Core_Block_Abstract->toHtml()
#11 /home/wpfsl/public_html/app/design/adminhtml/default/default/template/widget/tabs.phtml(38): Mage_Adminhtml_Block_Widget_Tabs->getTabContent(Object(Mage_Adminhtml_Block_Customer_Edit_Tab_View))
#12 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/wpfsl/pub...')
#13 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#14 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#15 /home/wpfsl/public_html/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#16 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Adminhtml_Block_Template->_toHtml()
#17 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#18 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Text_List->_toHtml()
#19 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Abstract.php(582): Mage_Core_Block_Abstract->toHtml()
#20 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Abstract.php(526): Mage_Core_Block_Abstract->_getChildHtml('left', true)
#21 /home/wpfsl/public_html/app/design/adminhtml/default/default/template/page.phtml(58): Mage_Core_Block_Abstract->getChildHtml('left')
#22 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/wpfsl/pub...')
#23 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#24 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#25 /home/wpfsl/public_html/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#26 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Adminhtml_Block_Template->_toHtml()
#27 /home/wpfsl/public_html/app/code/core/Mage/Core/Model/Layout.php(529): Mage_Core_Block_Abstract->toHtml()
#28 /home/wpfsl/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(391): Mage_Core_Model_Layout->getOutput()
#29 /home/wpfsl/public_html/app/code/core/Mage/Adminhtml/controllers/CustomerController.php(151): Mage_Core_Controller_Varien_Action->renderLayout()
#30 /home/wpfsl/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(420): Mage_Adminhtml_CustomerController->editAction()
#31 /home/wpfsl/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('edit')
#32 /home/wpfsl/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#33 /home/wpfsl/public_html/app/code/core/Mage/Core/Model/App.php(347): Mage_Core_Controller_Varien_Front->dispatch()
#34 /home/wpfsl/public_html/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#35 /home/wpfsl/public_html/index.php(80): Mage::run('', 'store')
#36 {main}";s:3:"url";s:80:"/index.php/wpfsl_admin/customer/edit/id/11/key/4e2ec034dd470035e31f5f55242e0811/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:5:"admin";}
抱歉,我也意识到,虽然我编写的代码至少可以让我编辑记录而不会出现任何错误,但仍然将客户自更改为随机日期值,例如 30 No -01 01:00:00 。
但如果我尝试从后端为同样使用 magento 后端创建的客户创建订单,我会收到以下错误
a:5:{i:0;s:825:"无效方法 Mage_Adminhtml_Block_Sales_Order_View_Tab_History::isCustomerNotificationNotApplicable(Array ( [0] =>大批 ( [标题] =>待办的 [通知] => 0 [评论] => [创建时间] => Zend_Date 对象 ( [_locale:Zend_Date:private] => en_GB [_fractional:Zend_Date:private] => 0 [_ precision:Zend_Date:private] => 3 [_unixTimestamp:Zend_Date_DateObject:private] => 1323946274 [_timezone:Zend_Date_DateObject:private] =>欧洲/伦敦 [_offset:Zend_Date_DateObject:private] => -3600 [_syncronized:Zend_Date_DateObject:private] => 0 [_dst:受保护] => 1 )
)
<代码>) )";i:1;s:4197:"#0 /home/wpfsl/public_html/app/design/adminhtml/default/default/template/sales/order/view/tab/history.phtml(38): Varien_Object- >__call('isCustomerNotif...', 数组) <代码> #1 /home/wpfsl/public_html/app/design/adminhtml/default/default/template/sales/order/view/tab/history.phtml(38): Mage_Adminhtml_Block_Sales_Order_View_Tab_History->isCustomerNotificationNotApplicable(数组) #2 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/wpfsl/pub...') #3 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...') #4 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView() #5 /home/wpfsl/public_html/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml() #6 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Adminhtml_Block_Template->_toHtml() #7 /home/wpfsl/public_html/app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php(303): Mage_Core_Block_Abstract->toHtml() #8 /home/wpfsl/public_html/app/design/adminhtml/default/default/template/widget/tabs.phtml(38): Mage_Adminhtml_Block_Widget_Tabs->getTabContent(Object(Mage_Adminhtml_Block_Sales_Order_View_Tab_History)) #9 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/wpfsl/pub...') #10 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...') #11 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView() #12 /home/wpfsl/public_html/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml() #13 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Adminhtml_Block_Template->_toHtml() #14 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml() #15 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Text_List->_toHtml() #16 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Abstract.php(582): Mage_Core_Block_Abstract->toHtml() #17 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Abstract.php(526): Mage_Core_Block_Abstract->_getChildHtml('left', true) #18 /home/wpfsl/public_html/app/design/adminhtml/default/default/template/page.phtml(58): Mage_Core_Block_Abstract->getChildHtml('left') #19 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/wpfsl/pub...') #20 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...') #21 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView() #22 /home/wpfsl/public_html/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml() #23 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Adminhtml_Block_Template->_toHtml() #24 /home/wpfsl/public_html/app/code/core/Mage/Core/Model/Layout.php(529): Mage_Core_Block_Abstract->toHtml() #25 /home/wpfsl/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(391): Mage_Core_Model_Layout->getOutput() #26 /home/wpfsl/public_html/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php(119): Mage_Core_Controller_Varien_Action->renderLayout() #27 /home/wpfsl/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(420): Mage_Adminhtml_Sales_OrderController->viewAction() #28 /home/wpfsl/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('view') #29 /home/wpfsl/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(对象(Mage_Core_Controller_Request_Http)) #30 /home/wpfsl/public_html/app/code/core/Mage/Core/Model/App.php(347): Mage_Core_Controller_Varien_Front->dispatch() #31 /home/wpfsl/public_html/app/Mage.php(640): Mage_Core_Model_App->run(数组) #32 /home/wpfsl/public_html/index.php(80): 法师::run('', 'store') #33 {main}";s:3:"url";s:88:"/index.php/wpfsl_admin/sales_order/view/order_id/3/key/148f59cc 3e6d14da7c22a004114985cf/";s:11:"script_name";s:10:"/index.php";s:4:"皮肤";s:5:"admin";}
我再次猜测这个错误也与日期因素有关?
I suddenly started encountering this error out of no where and need some help.
In my Manage Customers section, when ever I add a new customer, it shows up fine with all values correct. But whenever I try to edit a newly added customer I get an error page in Magento.
There has been an error processing your request.
And later when I return to 'Manage Customers' grid, the 'Customer Since' column for that customer record changes to this value "30 Nov -1 01:00:00"
So does any one have any idea what might be going wrong over there?
This is the error in var/report folder,
a:5:{i:0;s:25:"No date part in '' found.";i:1;s:4432:"#0 /home/wpfsl/public_html/lib/Zend/Date.php(1078): Zend_Date->_calculate('set', false, NULL, 'en_GB')
#1 /home/wpfsl/public_html/lib/Zend/Date.php(197): Zend_Date->set(false, NULL, 'en_GB')
#2 /home/wpfsl/public_html/app/code/core/Mage/Core/Model/Locale.php(478): Zend_Date->__construct(false, NULL, Object(Zend_Locale))
#3 /home/wpfsl/public_html/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View.php(76): Mage_Core_Model_Locale->date(false)
#4 /home/wpfsl/public_html/app/design/adminhtml/default/default/template/customer/tab/view.phtml(36): Mage_Adminhtml_Block_Customer_Edit_Tab_View->getCreateDate()
#5 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/wpfsl/pub...')
#6 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#7 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#8 /home/wpfsl/public_html/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#9 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Adminhtml_Block_Template->_toHtml()
#10 /home/wpfsl/public_html/app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php(303): Mage_Core_Block_Abstract->toHtml()
#11 /home/wpfsl/public_html/app/design/adminhtml/default/default/template/widget/tabs.phtml(38): Mage_Adminhtml_Block_Widget_Tabs->getTabContent(Object(Mage_Adminhtml_Block_Customer_Edit_Tab_View))
#12 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/wpfsl/pub...')
#13 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#14 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#15 /home/wpfsl/public_html/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#16 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Adminhtml_Block_Template->_toHtml()
#17 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#18 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Text_List->_toHtml()
#19 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Abstract.php(582): Mage_Core_Block_Abstract->toHtml()
#20 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Abstract.php(526): Mage_Core_Block_Abstract->_getChildHtml('left', true)
#21 /home/wpfsl/public_html/app/design/adminhtml/default/default/template/page.phtml(58): Mage_Core_Block_Abstract->getChildHtml('left')
#22 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/wpfsl/pub...')
#23 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#24 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#25 /home/wpfsl/public_html/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#26 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Adminhtml_Block_Template->_toHtml()
#27 /home/wpfsl/public_html/app/code/core/Mage/Core/Model/Layout.php(529): Mage_Core_Block_Abstract->toHtml()
#28 /home/wpfsl/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(391): Mage_Core_Model_Layout->getOutput()
#29 /home/wpfsl/public_html/app/code/core/Mage/Adminhtml/controllers/CustomerController.php(151): Mage_Core_Controller_Varien_Action->renderLayout()
#30 /home/wpfsl/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(420): Mage_Adminhtml_CustomerController->editAction()
#31 /home/wpfsl/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('edit')
#32 /home/wpfsl/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#33 /home/wpfsl/public_html/app/code/core/Mage/Core/Model/App.php(347): Mage_Core_Controller_Varien_Front->dispatch()
#34 /home/wpfsl/public_html/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#35 /home/wpfsl/public_html/index.php(80): Mage::run('', 'store')
#36 {main}";s:3:"url";s:80:"/index.php/wpfsl_admin/customer/edit/id/11/key/4e2ec034dd470035e31f5f55242e0811/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:5:"admin";}
Sorry I also realized that though the code I wrote atleast lets me edit my records without any error but still changes the Customer Since to a random date value like 30 No -01 01:00:00.
But also if I try to create an order from the back end for a customer also created using the back end of magento, I get the following error
a:5:{i:0;s:825:"Invalid method Mage_Adminhtml_Block_Sales_Order_View_Tab_History::isCustomerNotificationNotApplicable(Array
(
[0] => Array
(
[title] => Pending
[notified] => 0
[comment] =>
[created_at] => Zend_Date Object
(
[_locale:Zend_Date:private] => en_GB
[_fractional:Zend_Date:private] => 0
[_precision:Zend_Date:private] => 3
[_unixTimestamp:Zend_Date_DateObject:private] => 1323946274
[_timezone:Zend_Date_DateObject:private] => Europe/London
[_offset:Zend_Date_DateObject:private] => -3600
[_syncronised:Zend_Date_DateObject:private] => 0
[_dst:protected] => 1
)
)
)
)";i:1;s:4197:"#0 /home/wpfsl/public_html/app/design/adminhtml/default/default/template/sales/order/view/tab/history.phtml(38): Varien_Object->__call('isCustomerNotif...', Array)
#1 /home/wpfsl/public_html/app/design/adminhtml/default/default/template/sales/order/view/tab/history.phtml(38): Mage_Adminhtml_Block_Sales_Order_View_Tab_History->isCustomerNotificationNotApplicable(Array)
#2 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/wpfsl/pub...')
#3 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#4 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#5 /home/wpfsl/public_html/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#6 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Adminhtml_Block_Template->_toHtml()
#7 /home/wpfsl/public_html/app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php(303): Mage_Core_Block_Abstract->toHtml()
#8 /home/wpfsl/public_html/app/design/adminhtml/default/default/template/widget/tabs.phtml(38): Mage_Adminhtml_Block_Widget_Tabs->getTabContent(Object(Mage_Adminhtml_Block_Sales_Order_View_Tab_History))
#9 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/wpfsl/pub...')
#10 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#11 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#12 /home/wpfsl/public_html/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#13 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Adminhtml_Block_Template->_toHtml()
#14 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#15 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Text_List->_toHtml()
#16 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Abstract.php(582): Mage_Core_Block_Abstract->toHtml()
#17 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Abstract.php(526): Mage_Core_Block_Abstract->_getChildHtml('left', true)
#18 /home/wpfsl/public_html/app/design/adminhtml/default/default/template/page.phtml(58): Mage_Core_Block_Abstract->getChildHtml('left')
#19 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/wpfsl/pub...')
#20 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#21 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#22 /home/wpfsl/public_html/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#23 /home/wpfsl/public_html/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Adminhtml_Block_Template->_toHtml()
#24 /home/wpfsl/public_html/app/code/core/Mage/Core/Model/Layout.php(529): Mage_Core_Block_Abstract->toHtml()
#25 /home/wpfsl/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(391): Mage_Core_Model_Layout->getOutput()
#26 /home/wpfsl/public_html/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php(119): Mage_Core_Controller_Varien_Action->renderLayout()
#27 /home/wpfsl/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(420): Mage_Adminhtml_Sales_OrderController->viewAction()
#28 /home/wpfsl/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('view')
#29 /home/wpfsl/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#30 /home/wpfsl/public_html/app/code/core/Mage/Core/Model/App.php(347): Mage_Core_Controller_Varien_Front->dispatch()
#31 /home/wpfsl/public_html/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#32 /home/wpfsl/public_html/index.php(80): Mage::run('', 'store')
#33 {main}";s:3:"url";s:88:"/index.php/wpfsl_admin/sales_order/view/order_id/3/key/148f59cc3e6d14da7c22a004114985cf/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:5:"admin";}
Again I am guessing this error has also got something to do with the Date factor?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
这似乎是 Magento 中与不同区域设置中的日期格式相关的错误。编辑客户时,created_at 字段是可编辑的并显示在当前区域设置中。对于在英国的我来说,这是 DD/MM/YYYY。单击“保存”时,它尝试将此值直接放入数据库中,但失败,因为它不是可接受的数据库格式。
我通过将以下函数添加到 Mage_Customer_Model_Form 来修复此问题。更好的解决方案是创建类重写。更好的解决方案是 Magento 传递使用区域设置转换的任何字段,然后将它们转换回 iso 格式,然后再尝试将它们插入回数据库。据我所知,如果没有这个功能(也许我不知道它已经存在),这个问题很可能会再次出现。
编辑:
做了更多挖掘。我注意到 dob 字段工作正常。这是因为该字段本身设置了所有正确的位,以告诉日期选择器以 MM/DD/YYYY 格式发回日期。
Magento 似乎是为了通过多种方式处理这个问题而设计的。 CustomerController 中有一个未使用的函数 _filterPostData() ,它调用 _filterDates() ,它比我上面的解决方案做得更好(我认为)。
我已经更改了修复以使用此函数,尽管必须从控制器范围调用它。再次强调,我不建议更改核心代码,但我的新修复位于 Mage_Adminhtml_CustomerController::saveAction() 中。我添加了第二行:
It seems as though this is a bug in Magento related to the date formats in different locales. When editing a customer the created_at field is editable and displayed in the current locale. For me being in the UK this was DD/MM/YYYY. When clicking save it attempts to put this value directly into the database and fails because its not an acceptable database format.
I have fixed this by adding the following function to Mage_Customer_Model_Form. A much better solution would be to create a class rewrite. An even better solution would be for Magento to pass through any fields which are converted using locale and then convert them back to the iso format before trying to insert these back into the database. Without this feature (and maybe its there already I dont know) this problem is very likely to recur as far as I can see.
EDIT:
Done some more digging. I noticed that the dob field is working fine. This is because the field itself is set up with all the correct bits to tell the datepicker to send back a date in the MM/DD/YYYY format.
It seems Magento is set up to handle this problem in a number of ways. There is an unused function _filterPostData() in the CustomerController which calls _filterDates() which does a better job (I assume) than my solution above.
I have changed my fix to use this function, although it has to be called from the controller scope. Again, I dont advise changing core code, but my new fix is in Mage_Adminhtml_CustomerController::saveAction(). I have added the second of these lines:
根据上面的 Oscar Reales 帖子,更改
eav_attribute
表中的created_at
属性backend_model
解决了我的问题,但是我使用的值与 对我有用并输入 31/10/2012 显示正确的dob one,
eav/entity_attribute_backend_time_created
导致了上面的随机日期。我通过编辑在日期创建的现有帐户、在后端创建一个帐户并在前端创建一个帐户来对此进行了测试。一切都很好。顺便说一句,我的所在地是英国。As per Oscar Reales post above, changing the
created_at
attributebackend_model
in theeav_attribute
table fixed my problem, however the value I used was the same as the dob oneThat worked for me and entering 31/10/2012 showed correct, the
eav/entity_attribute_backend_time_created
resulted in the random date thing above. I have tested this by editing an existing accounts created at date, created an account in the backend and created an account in the frontend. All worked fine. Btw, my locale is UK.我也有这个问题,但我找到了无需任何编码即可更改它的方法。
首先,如果您收到此错误,这是由日期设置引起的,Magento 1.6 和 EE1.11 开始更新其数据库模型以便能够使用 Oracle 和其他 SQL DB。这就是为什么他们需要将数据库表类型从
datetime
更改为timestamp
,因为它可以简单地由数据库本身解析。解决办法如下:customer_entity
表。搜索created_at
字段,如果为空,请给它一个有效值,我很震惊,Magento 现在允许您在管理中编辑created_at
日期,不知道如何会有用的。您必须转到
配置
->目录
->日期和日期时间自定义选项
并确保它使用AU格式DD/MM/YYY
,如果这是在您的网站上线之前完成的,那么应该没问题。希望这会有所帮助,因为大多数开发人员在开始编码之前不会完成所有设置。干杯!
张本
I have this issue too, but I found the way to change it without any coding.
First of all if you get this error, it is caused by the date setting, Magento 1.6 and EE1.11 started updating their database model to be able to use Oracle and other SQL DB. This is why they need to change the database table type from
datetime
totimestamp
as it can simply be parsed by the database itself. The following is the solution:customer_entity
table. Search thecreated_at
field, if it is empty give it a valid value, I am so shocked that Magento now allows you to editcreated_at
date in admin, don't know how useful it will be.You must go to
Configuration
->Catalog
->Date & Time Custom Options
and make sure it is using AU formatDD/MM/YYY
and if this is done before your site goes live, it should be fine.Hope this help, as most developers will not go through all the settings before they start coding. Cheers!
Ben Zhang
在这里遇到同样的问题。
所以我在 Magento 1.6.1.0 的全新安装上进行了尝试,并发生了以下情况。
Struggling with the same kind of problem here.
So i've tried it on a clean install of Magento 1.6.1.0 and the following happens.
正如我之前所说,您可以使用自定义模块执行此属性 backend_model 更新,并将此行添加到设置脚本中:
As I stated before, you can do this attribute backend_model update using a custom module, and adding this line to the setup script:
假设您使用的是 Magento 1.6.x(您没有提及版本),报告的第 3 行和第 4 行
表明您的客户
created_at
字段*< /strong> 不包含有效的日期时间/时间戳:请注意,
Mage_Adminhtml_Block_Customer_Edit_Tab_View
无法格式化created_at
字段已存在(但无效)值。您的真正问题在其他地方,在记录生命周期的早期。
我首先检查添加新客户是否确实产生有效的
created_at
条目。*
customer_since
只是created_at
的虚拟映射。Assuming you're using Magento 1.6.x (you didn't mention the version), lines #3 and #4 of your report
indicate, that your customers
created_at
field* does not contain a valid datetime/timestamp:Note that
Mage_Adminhtml_Block_Customer_Edit_Tab_View
fails to format an already existing (but invalid) value of thecreated_at
field.Your real problem is somewhere else, earlier in the records lifecycle.
I'd start off checking whether adding of a new customer really produces valid
created_at
entries.*
customer_since
is only a virtual mapping ofcreated_at
.我正在使用 Magento ve 1.6.1。我的 getCreateDate() 函数与您提到的完全一样。我在那里没有看到问题,因为创建新客户时日期确实被正确保存。仅当我编辑记录时它才会改变。
找到了部分解决方案。使用此代码更改 lib/Zend/Date.php 让我可以很好地编辑和保存我的记录,而不会出现任何错误。
但是,当我编辑任何新添加的客户记录时,客户自更改回 30 Nov -1 01:00:00。那么这是一个已知的错误还是什么?有人可以解决这个问题吗?
I am using Magento ve 1.6.1. My getCreateDate() function is exactly as you have mentioned. I don't see a problem there, coz the date does get saved properly when a new customer is created. It only changes when I edit my records.
Found a partial solution. Changing lib/Zend/Date.php with this code lets me edit and save my records fine without giving any error.
But when ever I edit any newly added customer record, the Customer Since changes back to 30 Nov -1 01:00:00. So is this is a known bug or what? does any one have any work around this issue?
这是该属性使用的 backend_model 的问题。 dob 使用“eav/entity_attribute_backend_datetime”backend_model,产品使用“eav/entity_attribute_backend_time_created”,但客户的created_at 未使用它。这个 backend_model 正在处理所有转换和过滤日期,因此,就像更改“eav_attribute”表一样简单。搜索 attribute_code = 'created_at' ANDEntity_type_id = 1 并将 backend_model 的值从 NULL 更新为“eav/entity_attribute_backend_time_created”,即。无需更改核心文件。
如果您愿意,可以使用资源安装程序从您自己的模块的安装程序中更新此属性。
This is a problem with the backend_model used by this attribute. dob uses "eav/entity_attribute_backend_datetime" backend_model, and product is using "eav/entity_attribute_backend_time_created" but created_at for customer is not using it. This backend_model is handling all the conversion and filter dates, so, it is so simple as changing the "eav_attribute" table. Search for the attribute_code = 'created_at' AND entity_type_id = 1 and update the value of the backend_model from NULL to "eav/entity_attribute_backend_time_created" and that is. No core files needs to be changed.
If you prefer, you can use a Resource Setup to update this attribute from the installer of your own module.