0

拡張機能をすべて削除しました。このエラーが表示されました。アプリケーションファイル全体を置き換えました。それはまだ現れました。AuditFieldBehavior を検索しましたが、何も表示されませんでした。次に見ることができるアイデアはありますか?

AuditFieldBehavior は、CActiveRecordBehavior を拡張するクラスです。

エラーは次のとおりです。

致命的なエラー: CComponent::__isset(): スクリプトがメソッドを実行しようとしたか、不完全なオブジェクトのプロパティにアクセスしようとしました。unserialize() が呼び出される前に、操作しようとしているオブジェクトのクラス定義「AuditFieldBehavior」がロードされていることを確認するか、クラス定義をロードする __autoload () 関数を提供してください。

[編集] すべてのページが空白で表示されます。だから私は走ったerror_reporting(E_ALL);ini_set('display_errors', 'On');、これが私が得たものです: ここに画像の説明を入力

CWebLogRoute で、この最後の数行を取得します。 ここに画像の説明を入力

4

1 に答える 1

0

これは、AuditFieldBehavior を呼び出さないようにモデル (CActiveRecord) の動作を再構成していないために発生しています。監査証跡を構成したモデルには、同様の機能が必要です。

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 に答える