【问题标题】:Magento - Editing Customer Information then saving causes errorMagento - 编辑客户信息然后保存导致错误
【发布时间】:2023-03-24 04:30:01
【问题描述】:

在 Magento 中,在客户下,当您编辑客户时,从最小的更改甚至没有更改,然后单击保存,我在调试控制台中收到以下错误:

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 
/var/www/html/app/code/core/Mage/Eav/Model/Form.php on line 327 and defined  in 
/var/www/html/app/code/core/Mage/Eav/Model/Attribute/Data.php on line 59

在那之后,请等待消息永远挂起并且没有任何更新,即使我刷新或返回。

【问题讨论】:

    标签: magento


    【解决方案1】:

    好的,我能够解决我的问题。自从我最近更新了我的数据库以来,这是由 Amasty 客户属性扩展引起的。我禁用了它,问题就消失了。

    【讨论】:

      【解决方案2】:

      我收到了这个错误:

      传递给 Mage_Eav_Model_Attribute_Data::factory() 的参数 1 必须是 Mage_Eav_Model_Attribute 的实例,给定的 Mage_Eav_Model_Entity_Attribute 实例

      查看页面源,我看到页面在输出客户性别之前就停止了。我发现 eav_attribute.attribute_model 已更新为“性别”属性代码的“eav/entity_attribute”。

      临时修复: UPDATE eav_attribute SET attribute_model='' WHERE attribute_code='gender';

      然后损坏的页面再次正常工作..直到发生某些事情并且值再次使用“eav/entity_attribute”更新...

      背景: 我确实使用相同的 attribute_code 'gender' 创建了自己的属性( - 多么错误),但后来删除了我的属性,但问题全天间歇性地持续存在。我相信这是在每个新订单之后或保存一些对象之后。

      结论: 我相信问题发生在使用现有属性代码创建新属性时。删除并使用新的属性代码重新创建新属性。停止以某种方式更新 eav_attribute.attribute_model 字段!

      祝你好运

      【讨论】:

        猜你喜欢
        • 2013-11-17
        • 2016-09-02
        • 1970-01-01
        • 1970-01-01
        • 2011-10-17
        • 2013-04-05
        • 1970-01-01
        • 2016-02-18
        • 2017-03-14
        相关资源
        最近更新 更多