Node revisions don't work. That is not an exaggeration. Try this simple test under a HEAD installation: create a node with the "create new revision" checkbox checked. Then edit it, with the "create new revision" checkbox checked. Then, go to the revisions page and try to view the old revision. It doesn't work: instead, the new revision is displayed. This is a critical error as Drupal 6 cannot be released with node revisions in this state.

I have double checked this on a clean HEAD install, same thing happens.

I believe the error is in this line:

<?php
$items['node/%node/revisions/%/view'] = array(
    'title' => 'Revisions',
    'page callback' => 'node_show',
    'page arguments' => array(1, NULL, TRUE),
    'type' => MENU_CALLBACK,
  );
?>

It should be something like:

<?php
$items['node/%node/revisions/%/view'] = array(
    'title' => 'Revisions',
    'load arguments' => array(3),
    'page callback' => 'node_show',
    'page arguments' => array(1, NULL, TRUE),
    'type' => MENU_CALLBACK,
  );
?>

However, I'm hardly an expert at the menu system, so this could turn out to be completely the wrong solution. In any case, however, something is going wrong in the loading of the older revision of the node. Whatever the cause, this certainly needs to be fixed.

CommentFileSizeAuthor
#1 node_revisions.patch610 bytestheborg
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

theborg’s picture

FileSize
610 bytes

Good catch!

Tested: added, deleted and reverted revisions and it works ok.
Patch provided.

theborg’s picture

Status: Active » Needs review
catch’s picture

Status: Needs review » Reviewed & tested by the community

Tested, works. RTBC.

Gábor Hojtsy’s picture

Title: Node revisions don't work » Node revision view page does not show that revision

Well, the issue at hand seems to be that the view page for node a revision is not displaying that node revision, not that revisions do not work :)

chx’s picture

Patch is indeed RTBC I have no idea how this happened :(

catch’s picture

All my revisions testing the other patch were variations on agagagagag - so I simply didn't notice they were actually the same when looking at old ones.

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, committed.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.