0

将我的 magento 实例从 1.4.0 更新到 1.7.0.2 后,出现以下错误:

Invalid backend model specified: customer_entity/address_attribute_backend_region

该错误发生在结帐过程中,当客户从下拉列表中选择地址并按“继续”按钮时。

对 /checkout/onepage/saveBilling/ 的 AJAX 请求失败,对 checkout/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";}
4

1 回答 1

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”中找到,但在我的情况下,(还没有)需要更改值。

于 2013-08-28T15:47:43.040 回答