Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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
Comment | File | Size | Author |
---|---|---|---|
#18 | diff-239056-18-prevents-404-when-singular-revision.patch | 959 bytes | Alan D. |
#15 | diff-239056-15-prevents-404-when-singular-revision.patch | 965 bytes | Alan D. |
#10 | diff-view-latest-and-predecessor-01.patch | 1.86 KB | smokris |
#9 | diff-view-latest-and-predecessor.patch | 1.93 KB | smokris |
#8 | diff-view-latest.patch | 1017 bytes | smokris |
Comments
Comment #1
moshe weitzman CreditAttribution: moshe weitzman commentedHow would you expose this feature in the UI? How would you use it?
Comment #2
Leeteq CreditAttribution: Leeteq commentedSimply 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.
Comment #3
moshe weitzman CreditAttribution: moshe weitzman commentedComment #4
moshe weitzman CreditAttribution: moshe weitzman commentedCommitted to 5.x and 6.x. New version issued for 5.
Comment #5
Leeteq CreditAttribution: Leeteq commentedGreat, works nicely - thanks a bunch - here is a related idea for an accompanying block:
http://drupal.org/node/302989
Comment #6
Leeteq CreditAttribution: Leeteq commentedWhen 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.
Comment #7
moshe weitzman CreditAttribution: moshe weitzman commentedComment #8
smokrisHere's a patch (against the latest 6.x-2.x-dev code) to handle the case where a node has only a single version.
Comment #9
smokrisRelatedly, 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.)
Comment #10
smokrisHere's a slight revision to the last patch, to make use of
_diff_get_previous_vid()
.Comment #11
Leeteq CreditAttribution: Leeteq commentedComment #12
mitchell CreditAttribution: mitchell commentedBumping to latest branch.
Postponing due to inactivity.
Comment #13
Leeteq CreditAttribution: Leeteq commentedInactivity 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?
Comment #14
mitchell CreditAttribution: mitchell commented#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.
Comment #15
Alan D. CreditAttribution: Alan D. commentedThe 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.
Comment #16
Alan D. CreditAttribution: Alan D. commentedPS: Running update.php rebuilds the menu which is required to avoid the 404.
Comment #17
Alan D. CreditAttribution: Alan D. commentedPushed to dev f42001c
Needs to be back ported to 6.x.
Comment #18
Alan D. CreditAttribution: Alan D. commentedDrupal 6.x-2.x re-roll.
No test environment so I need test voluntaries before I can commit.
Comment #19
Alan D. CreditAttribution: Alan D. commentedClosed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.