Open zeb600 opened 8 years ago
For your first issue (0 vs null), are the databases exactly the same? At a guess I would assume that your prod db allows null and the dev box is set to not null for the field in question.
For your second issue (audit_request_id=0), it would seem that for some reason the AuditRequest is not being written. This is very strange. I would recommend debugging the code that starts here, and reporting your findings: https://github.com/cornernote/yii-audit-module/blob/master/audit/components/AuditErrorHandler.php#L192
Thanks for your quick reply.
First issue: That's what I thought at first, but the DBs are the same. Both allow NULL.
EDIT AH I found something:
changing
'ignoreValues' => array(),
to
'ignoreValues' => array('ohwelljustignoreme'),
seems to fix it, 0 is now written correctly to the prod DB. Somehow the empty ignoreValue array didn't overwrite the default
public $ignoreValues = array('0', '0.0', '0.00', '0.000', '0.0000', '0.00000', '0.000000', '0000-00-00', '0000-00-00 00:00:00');
in AuditFieldBehavior.php? Don't really see how that's possible - or could be different depending on box.
Second issue: Will investigate.
Yes, it should be assigning array()
to AuditFieldBehavior->ignoreValues
when the CActiveRecord attaches the behaviors here:
https://github.com/yiisoft/yii/blob/1.1.17/framework/YiiBase.php#L220
Very strange that this functionality differs on a different operating environment.
Can you list the OS and PHP versions in your dev/prod boxes?
Hi,
first of all thanks for a great module.
I do have two kind-of-issues - maybe questions - though: Right now I'm only using it to monitor and track changes to a couple of fields in one model. On my dev box everything works fine. After pushing to production there's the slight issue of "0" not being written to the audit_field table.
I.e.: On dev box:
On prod box:
There's literally nothing in where 0 should be. My "ingoreValues" array for that model is empty:
Any thoughts?
Also the audit_request_id never changes (always 0), is that expected behaviour?
I'm using the latest stable version (1.1.10) /w yii 1.1.15