IT would be practical to be able to make a menu entry pointing to a nodes "latest diff", meaning a URL that goes directly to the view of the current revision against the previous revision. (does this exist already? Then please enlighten me...)

So instead of having to alter the numbers (node/123/revisions/view/331/351), it could support something like node/123/revisions/view/latest
or
node/123/revisions/view/current

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

moshe weitzman’s picture

How would you expose this feature in the UI? How would you use it?

Leeteq’s picture

Simply make a menu entry or link to it from anywhere.
The point is to be able to not know which revision numbers are the current and the previous version, as they change dynamically.
Would be practical to have a link that pointed to the diff view of whicever is the last two revisions (current and previous). Exactly what it suggest when you enter the diff page: the two topmost revisions are always selected. When pressing "show diff" you get to that page, but next time that URL is different, if there are new revisions. So how about making a url dedicated to show the diff of the last two? The "UI" is no different, only the page we get today when clicking on show diff.

No problem if such a URL is redirecting to the normal URL style with both revision numbers in it, but the function I suggest is simply one url that will trigger a lookup to find out which are the two latest, then go straight to that "show diff" page. That URL should only contain the node id and a logical word so it is easy to rememember when making such links to several nodes.

moshe weitzman’s picture

Version: 5.x-2.x-dev » 6.x-2.x-dev
moshe weitzman’s picture

Status: Active » Fixed

Committed to 5.x and 6.x. New version issued for 5.

Leeteq’s picture

Great, works nicely - thanks a bunch - here is a related idea for an accompanying block:
http://drupal.org/node/302989

Leeteq’s picture

Status: Fixed » Active

When placing links to selected nodes in a menu or block, sometimes the content manager does that to prepare for future work, not needing to wait for a minimum of two node revisions to exist for each node listed, but simply placing the nodes there so that work can commence.

With the current code, when visiting a link to a node that does not have two revisions, it returns the "access denied" page.
Instead, it should redirect to the current revision, preferably with a message on top informing that only one revision exist.

moshe weitzman’s picture

Title: Fixed path to the latest diff (current and previous versions) » Fixed path to the latest diff (and handle case when there is only 1 revision)
smokris’s picture

Status: Active » Needs review
FileSize
1017 bytes

Here's a patch (against the latest 6.x-2.x-dev code) to handle the case where a node has only a single version.

smokris’s picture

Relatedly, it would be handy to be able to easily construct a link that shows a diff between a specified vid and its predecessor.

For example, currently, to show what changed in vid 14 of node 7, you need to know that, for node 7, the previous vid was 5: node/7/revisions/view/5/14

Attached is a patch that implements an alternate syntax for this situation: node/7/revisions/view/14 --- so that you only need to know the target vid. (This patch includes the previous patch.)

smokris’s picture

Here's a slight revision to the last patch, to make use of _diff_get_previous_vid().

Leeteq’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev
mitchell’s picture

Version: 7.x-2.x-dev » 7.x-3.x-dev
Status: Needs review » Postponed

Bumping to latest branch.
Postponing due to inactivity.

Leeteq’s picture

Status: Postponed » Active

Inactivity does not indicate a postponed issue...
With a postponed state, readers could mistake this for something that is deliberately postponed, which it is not yet?

mitchell’s picture

#13: That makes more sense.
---

When I tested D7 Revisioning with Diff for #1550856: Diff and Revisioning modules argue over who has URL permissions, I found the two modules to be incredibly complementary. However, Revisioning hasn't been rewritten for Entities, so while it provides some of this, that part isn't of much use atm. There are other however other parts that should be checked into.

#1: I think the mockups in #1776796-22: Provide a better UX for creating, editing & managing draft revisions. match this functionality closely.

Alan D.’s picture

Status: Active » Needs review
FileSize
965 bytes

The 404 is a bug that needs fixing, but I am not sold on the "a link that shows a diff between a specified vid and its predecessor". Please open a new feature request if you want to push that forward.

Re-rolled against 7.x-3.x with fixes to the permissions.

Alan D.’s picture

PS: Running update.php rebuilds the menu which is required to avoid the 404.

Alan D.’s picture

Version: 7.x-3.x-dev » 6.x-2.x-dev
Category: feature » bug
Priority: Normal » Minor

Pushed to dev f42001c

Needs to be back ported to 6.x.

Alan D.’s picture

Drupal 6.x-2.x re-roll.

No test environment so I need test voluntaries before I can commit.

Alan D.’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

Closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.