bedezign / yii2-audit

Yii2 Audit records and displays web/cli requests, database changes, php/js errors and associated data.
https://bedezign.github.io/yii2-audit/
Other
193 stars 111 forks source link

Getting unknown property: bedezign\yii2\audit\Audit::tracePathMappings #285

Open lloyd966 opened 2 years ago

lloyd966 commented 2 years ago

I recently install this extension, and in general it works great. Thank you for this great extension.

Inside the view screen for an individual Entry, when I click Database or the Logs tab I get the following Error

Unknown Property – yii\base\UnknownPropertyException Getting unknown property: bedezign\yii2\audit\Audit::tracePathMappings

Can anyone let me know how to fix this problem.

Please note that when I click on the Request or Profiling tab it works perfectly.

Any help would be greatly appreciated.

Lloyd

lloyd966 commented 2 years ago

Fixed.

Turns out I placed the following

'bedezign\yii2\audit\AuditTrailBehavior',

in the Controller behaviours rather than the Model behaviours. removing from the controller and placing in the Model fixed the error.