Magento管理>系统>配置>高级>系统 - 致命错误 [英] Magento Admin > System > Configuration > Advanced > System - Fatal Error

查看:103
本文介绍了Magento管理>系统>配置>高级>系统 - 致命错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试访问系统>配置>高级>系统

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:-


  1. 禁用编译系统 - >工具 - >编译

  2. 刷新缓存系统 - >缓存管理

  1. Disable Compilation (System -> Tools -> Compilation)
  2. Refresh Cache (System -> Cache Management)

这篇关于Magento管理>系统>配置>高级>系统 - 致命错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆