Community Documentation

Node revisions

Last updated December 14, 2012. Created by mocolvin on October 13, 2008.
Edited by schultetwin, gisle, HongPong, akhodakovskiy. Log in to edit this page.

Drupal lets you create a new revision every time a node is updated. This allows you to track how the node has changed over time on your site.

To enable this feature you go to the default node editing form (D6: administer/content management/content types/edit/workflow settings; D7: administer/structure/content types/edit/publishing options) and check the box Create a new revision in the node editing form. This will result in a new revision being created every time the node is edited. (Administrators can override this when editing an individual node.)

To view and manage revisions, use the Revisions tab when viewing a node (you must have "view revisions" or "administer nodes" permission to view revisions.) From the Revisions tab, you can view the individual revisions, revert to an earlier revision, and delete revisions (you must have the "administer nodes" or "revert revisions" and "delete revisions" permissions).

One interesting detail of the system is the behaviour of the reverting mechanism. Let's say you have revisions {1,2,3,current}. If you revert to revision #2, a copy of #2 is made and the copy is set as the current revision. Thus, after reverting you'll have {1,2,3,4,current}, where current is a clone of #2, and #4 is the previous current revision.

Another useful feature of the revision system is the Log field, which appears near the "Create a new revision" check box on the node editing form. If you add a message to the Log field when you create a revision, that message will appear on the Revisions tab along with the revision. It is a good idea to add a meaningful Log message whenever you create a node revision, so that others (or you, months later) can see why you changed the node and what your changes were, without having to actually view the previous revision.

You can enhance the revisions tab by installing the contributed Diff module. This module allows you to see the differences between two revisions; without this module, you can only view the entire content of each revision, and it may be difficult to tell exactly what has changed between the revisions.

(Authoring note: Some of the content of this page came from http://groups.drupal.org/node/1875.)

The Revisioning module provides more fine-grained control for revisions in Drupal 6.x and 7.x: http://drupal.org/project/revisioning

Comments

Template for revision system?

I have a client who would like to see their revisions exactly as they would appear if they were selected as the current revision. However, when viewing inactive revisions, the sidebar regions are not being displayed. I've checked the settings for the blocks that SHOULD appear there, and they're all set correctly... I have looked around for a template that might drive this page with no luck. Can anyone help point me in the right direction?

Thanks,
S

nobody click here