Magento管理>系统>配置>高级>系统 - 致命错误 [英] Magento Admin > System > Configuration > Advanced > System - Fatal Error
问题描述
当我尝试访问系统>配置>高级>系统
I get this error when I try to access System > Configuration > Advanced > System
致命错误:调用成员函数toOptionArray在/home/server/public_html/store/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php第421行上
Fatal error: Call to a member function toOptionArray() on a non-object in /home/server/public_html/store/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php on line 421
我发现这个answer:致命错误:调用成员函数toOptionArray()
I found this answer: Fatal error: Call to a member function toOptionArray()
但是,根据该答案需要替换的代码与该文件(Form.php)中的代码不同:
However, the code that needs to be replaced according to that answer is different from the code in that file (Form.php):
if ($method) {
if ($fieldType == 'multiselect') {
$optionArray = $sourceModel->$method();
} else {
$optionArray = array();
foreach ($sourceModel->$method() as $value => $label) {
$optionArray[] = array('label' => $label, 'value' => $value);
}
}
} else {
$optionArray = $sourceModel->toOptionArray($fieldType == 'multiselect');
}
$field->setValues($optionArray);
}
}
}
return $this;
任何想法?感谢!
推荐答案
以下步骤可以解决错误: -
The following steps should solve the error:-
- 禁用编译(
系统 - >工具 - >编译
) - 刷新缓存(
系统 - >缓存管理
)
- Disable Compilation (
System -> Tools -> Compilation
) - Refresh Cache (
System -> Cache Management
)
这篇关于Magento管理>系统>配置>高级>系统 - 致命错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!