1

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?

2 Answers 2

2

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.

1
  • I want to use Revisions module to direct a new node change to a moderator. Unfortunately there does not seem to be any way to forward only those nodes whose data have changed
    – AgA
    Feb 16, 2012 at 14:05
1

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.

1
  • What does it show if node is saved as a new revision without any changes?
    – AgA
    Feb 16, 2012 at 14:05

Your Answer

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

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