发生这种情况是因为您尚未重新配置模型的行为 (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 数组才能完全删除它