0

我删除了整个扩展。出现了这个错误。我什至替换了整个应用程序文件。它仍然出现了。我搜索了 AuditFieldBehavior,没有任何结果。有什么想法可以让我接下来看吗?

AuditFieldBehavior 是扩展 CActiveRecordBehavior 的类。

这是错误:

致命错误:CComponent::__isset():脚本试图执行方法或访问不完整对象的属性。请确保您尝试操作的对象的类定义“AuditFieldBehavior”在调用 unserialize()之前已加载或提供 __autoload() 函数来加载类定义

[编辑] 我所有的页面都显示为空白。所以我跑了error_reporting(E_ALL);ini_set('display_errors', 'On');,这就是我得到的: 在此处输入图像描述

在 CWebLogRoute 我得到这最后几行: 在此处输入图像描述

4

1 回答 1

0

发生这种情况是因为您尚未重新配置模型的行为 (CActiveRecord) 以不调用 AuditFieldBehavior 您配置审计跟踪的模型应该具有类似的功能

public function behaviors()
    {
        return array(
            'AuditFieldBehavior' => array(
                // Path to AuditFieldBehavior class.
                'class' => 'audit.components.AuditFieldBehavior',

                // Set to false if you just want to use getDbAttribute and other methods in this class.
                // If left unset the value will come from AuditModule::enableAuditField
                'enableAuditField' => null,

                // Any additional models you want to use to write model and model_id audits to.  If this array is not empty then
                // each field modifed will result in an AuditField being created for each additionalAuditModels.
                'additionalAuditModels' => array(
                    'Post' => 'post_id',
                ),

                // A list of values that will be treated as if they were null.
                'ignoreValues' => array('0', '0.0', '0.00', '0.000', '0.0000', '0.00000', '0.000000', '0000-00-00', '0000-00-00 00:00:00'),
            ),
        );
    }

删除它们,你应该没问题

注意:您还必须修改配置文件

您可能需要删除配置文件中的 errorHandler 和 LogRoute 数组才能完全删除它

于 2014-05-08T12:26:43.390 回答