将我的magento实例从1.4.0更新到1.7.0.2后,我遇到以下错误:
Invalid backend model specified: customer_entity/address_attribute_backend_region
在结帐过程中发生错误,而客户从下拉列表中选择地址并按“继续”按钮。
对/ checkout / onepage / saveBilling /失败的AJAX请求,第二次结帐请求/ onepage / getAdditional响应。客户将被重定向到购物车概述页面,但内容失败的ajax响应显示错误报告编号,可以使用FTP查找文件夹var / reports / #### reportnumber ###。log
编辑:堆栈跟踪
a:5:{i:0;s:81:"Invalid backend model specified: customer_entity/address_attribute_backend_region";i:1;s:1907:"#0 /home/www/p10000/html/magento/app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php(346): Mage::exception('Mage_Eav', 'Invalid backend...')
#1 /home/www/p10000/html/magento/app/code/core/Mage/Eav/Model/Entity/Abstract.php(1094): Mage_Eav_Model_Entity_Attribute_Abstract->getBackend()
#2 /home/www/p10000/html/magento/app/code/core/Mage/Eav/Model/Entity/Abstract.php(998): Mage_Eav_Model_Entity_Abstract->_setAttributeValue(Object(Mage_Customer_Model_Address), Array)
#3 /home/www/p10000/html/magento/app/code/core/Mage/Eav/Model/Entity/Abstract.php(959): Mage_Eav_Model_Entity_Abstract->_loadModelAttributes(Object(Mage_Customer_Model_Address))
#4 /home/www/p10000/html/magento/app/code/core/Mage/Core/Model/Abstract.php(225): Mage_Eav_Model_Entity_Abstract->load(Object(Mage_Customer_Model_Address), '209', NULL)
#5 /home/www/p10000/html/magento/app/code/core/Mage/Checkout/Model/Type/Onepage.php(246): Mage_Core_Model_Abstract->load('209')
#6 /home/www/p10000/html/magento/app/code/core/Mage/Checkout/controllers/OnepageController.php(320): Mage_Checkout_Model_Type_Onepage->saveBilling(Array, '209')
#7 /home/www/p10000/html/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Checkout_OnepageController->saveBillingAction()
#8 /home/www/p10000/html/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('saveBilling')
#9 /home/www/p10000/html/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#10 /home/www/p10000/html/magento/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#11 /home/www/p10000/html/magento/app/Mage.php(686): Mage_Core_Model_App->run(Array)
#12 /home/www/p10000/html/magento/index.php(101): Mage::run('', 'store')
#13 {main}";s:3:"url";s:60:"/magento/index.php/checkout/onepage/saveBilling/";s:11:"script_name";s:18:"/magento/index.php";s:4:"skin";s:11:"german";}
答案 0 :(得分:1)
我找到了这个主题:http://www.magentocommerce.com/boards/viewthread/261499/#t350593
所以我创建了这个声明(我在learningmagento.com找到的前两行,但它们是不完整的,如果你不改变源模型,它会导致onepage / saveBilling-Page的完全中断。
UPDATE `eav_attribute` SET `backend_model` = 'customer/entity_address_attribute_backend_street' WHERE `attribute_code` ='street' LIMIT 1 ;
UPDATE `eav_attribute` SET `backend_model` = 'customer/entity_address_attribute_backend_region' WHERE `attribute_code` ='region' LIMIT 1 ;
UPDATE `eav_attribute` SET `source_model` = 'customer/entity_address_attribute_source_country' WHERE `source_model` = 'customer_entity/address_attribute_source_country' LIMIT 1 ;
UPDATE `eav_attribute` SET `source_model` = 'customer/entity_address_attribute_source_region' WHERE `source_model` ='customer_entity/address_attribute_source_region' LIMIT 1 ;
它对我有用。在我的情况下,AJAX请求响应了电话号码的验证错误,但这很容易解决。
“customer_entity / ...”也可以在“eav_entity_type”表中找到,但在我的情况下,(尚未)需要更改值。