I'm having problems with the VAT field after a customer placed an order and entered a VAT number.
Everything appears to be working except when opening an order with a VAT number filled in. The following error shows up in the logs:
Recoverable Error: Argument 1 passed to Mage_Eav_Model_Attribute_Data::factory() must be an instance of Mage_Eav_Model_Attribute, instance of Mage_Eav_Model_Entity_Attribute given, called in .../app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Info.php on line 133 and defined in .../app/code/core/Mage/Eav/Model/Attribute/Data.php on line 59
The solution in a similar issue (Magento - Recoverable Error: Argument 1 passed to Mage_Eav_Model_Attribute_Data::factory()) was to remove any attribute_model
s from the eav_attributes
table. This solution works until another order with a VAT number is placed. In that case the attribute_model
for the taxvat is set to eav/entity_attribute
.
I've looked through the Magento source where the VAT number might get saved but I couldn't find anything. What causes the attribute_model
to be updated and is there any way to avoid it being set?
I'm running Magento v1.9.0.1 on PHP 5.5