Why does the timestamp of node_revisions and changed of node tables are updated when I save a node without making any changes?
All I want to know if anything ever changed in a node (revision). Is there a way to find it?
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.Sign up to join this community
If you save a node then it has changed according to Drupal...regardless of whether or not any specific property/CCK field values have actually been changed.
You can find the evidence for this in the
node_save() function which contains this line of code which runs for every single call to the function:
// The changed timestamp is always updated for bookkeeping purposes (revisions, searching, ...) $node->changed = $time;
Drupal does not do any sort of
diff against the current and new revisions of a node when saving, so if you've pressed "Save" it makes the assumption that you wanted to add a new revision of the node.
Maybe the Diff module could be helpful for you. It shows the changes between revisions.
This module adds a tab for sufficiently permissioned users. The tab shows all revisions like standard Drupal but it also allows pretty viewing of all added/changed/deleted words between revisions.