1

Is there a simple way to know if an entry's content changed when it was saved?

I'm pulling data from an XML feed and create/update entries in a section. I need to know which entries has new data. I guess I could check each field value individually, or make some kind of hash and check that. But is there some built-in way in Yii/Craft that is easier?

1 Answer 1

1

I don't think there's currently anything in Craft that's going to help you here.

Ideally we'd track for dirty/changed fields in JavaScript on an edit entry page and pass that as a parameter into the onBeforeSaveEntry event.

2
  • Ok, I'll just have to write my own isDirty(). :) Commented Oct 31, 2014 at 23:38
  • Cool... I think your hash idea is the way I'd try first. :)
    – Brad Bell
    Commented Oct 31, 2014 at 23:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.