Php 编辑客户帐户时出现Magento致命错误
我有Magento 1.7.0.2,当我尝试在“管理”面板中编辑客户帐户时,会出现以下错误: 致命错误:在第77行的/home/techspec/public\u html/magento/includes/src/Mage\u Adminhtml\u Block\u Customer\u Edit\u Tab\u Account.php中对非对象调用成员函数setRenderer()Php 编辑客户帐户时出现Magento致命错误,php,mysql,magento,Php,Mysql,Magento,我有Magento 1.7.0.2,当我尝试在“管理”面板中编辑客户帐户时,会出现以下错误: 致命错误:在第77行的/home/techspec/public\u html/magento/includes/src/Mage\u Adminhtml\u Block\u Customer\u Edit\u Tab\u Account.php中对非对象调用成员函数setRenderer() $attributes = $customerForm->getAttributes(); f
$attributes = $customerForm->getAttributes();
foreach ($attributes as $attribute) {
/* @var $attribute Mage_Eav_Model_Entity_Attribute */
$attribute->setFrontendLabel(Mage::helper('customer')->__($attribute->getFrontend()->getLabel()));
$attribute->unsIsVisible();
}
$disableAutoGroupChangeAttributeName = 'disable_auto_group_change';
$this->_setFieldset($attributes, $fieldset, array($disableAutoGroupChangeAttributeName));
$form->getElement('group_id')->setRenderer($this->getLayout()
->createBlock('adminhtml/customer_edit_renderer_attribute_group')
->setDisableAutoGroupChangeAttribute($customerForm->getAttribute($disableAutoGroupChangeAttributeName))
->setDisableAutoGroupChangeAttributeValue($customer->getData($disableAutoGroupChangeAttributeName)));
if ($customer->getId()) {
$form->getElement('website_id')->setDisabled('disabled');
$form->getElement('created_in')->setDisabled('disabled');
} else {
$fieldset->removeField('created_in');
$form->getElement('website_id')->addClass('validate-website-has-store');
即参考文件的第67至87行。我很乐意帮忙。谢谢 看起来属性
组id
不在可编辑属性列表中。确保属性可见。使用此选项进行检查
SELECT * FROM `eav_attribute` e
LEFT JOIN `customer_eav_attribute` ce ON e.attribute_id = ce.attribute_id
WHERE e.attribute_code = 'group_id'
查看字段的值是否可见
如果你没有从上面的查询中得到任何结果,那么你就有麻烦了
如果该值为1,则该属性可能未设置为显示在管理表单中。获取上一个查询返回的属性\u id
,然后执行此操作。假设该值为10
select * from customer_form_attribute where attribute_id = 10;
如果没有包含form\u code
=adminhtml\u customer
的记录,则应添加该记录