0

I removed the entire extension. This error showed up. I even replaced the entire application files. It still showed up. I searched AuditFieldBehavior, nothing showed up. Any ideas where I can look next?

AuditFieldBehavior is the class that extends CActiveRecordBehavior.

Here is the error:

Fatal error: CComponent::__isset(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "AuditFieldBehavior" of the object you are trying to operate on was loaded before unserialize() gets called or provide a __autoload() function to load the class definition

[edit] All my pages show blank. So I ran error_reporting(E_ALL);ini_set('display_errors', 'On'); and this is what I got: enter image description here

in CWebLogRoute i get this last few lines: enter image description here

hammies
  • 1,344
  • 2
  • 22
  • 46

1 Answers1

0

This is happening because you have not reconfigured the behaviours of your models ( CActiveRecord) not to call on AuditFieldBehavior Your models where you configured audit trails should have a similar function

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'),
            ),
        );
    }

Remove them and you should be fine

Note: You have to modify your config files as well

You may need remove the errorHandler, and LogRoute arrays in your config file to fully remove this

Manquer
  • 7,390
  • 8
  • 42
  • 69
  • That is already removed. Config files are also removed. In fact, I replaced everything with my older files and I still get this error. – hammies May 08 '14 at 12:33
  • It would be helpful if you can post the stack trace; we can find where it is being called from – Manquer May 08 '14 at 13:00
  • okay, i realized this is only happening on chrome. Guess this would be another issue. Thanks for your help. – hammies May 08 '14 at 14:15