If a user clicks the 'edit' tab, their latest revision is loaded for editing - fine. But if they view a revision and click the "edit revision" link, the latest revision is still loaded, instead of the one they requested.

Comments

toemaz’s picture

Hi John, a nice and simple patch. Can you explain a possible use case for this behaviour?

One thing I was wondering about, perhaps you should make this behaviour optional. So, create a setting for this. I can think of several use cases which wouldn't want this kind of functionality.

john morahan’s picture

Status: Needs review » Needs work

This is how I would expect an "edit revision" link (i.e. the one in the drupal_set_message) to work when I'm viewing a specific revision. If not, then what's it there for? If you want to edit your latest revision, you can just use the edit tab as usual.

The use case is when you want to make a new version based on an existing pending revision, other than the latest, without first publishing that revision.

I agree though that it would probably be more useful as an optional setting. I'll try to have a look at this later.

toemaz’s picture

This is how I would expect an "edit revision" link (i.e. the one in the drupal_set_message) to work when I'm viewing a specific revision. If not, then what's it there for? If you want to edit your latest revision, you can just use the edit tab as usual.

Sure, you're right about that. Perhaps it should be optional for the revisions-edit link to be displayed (enabled) or not. So I do agree your patch is implementing the right behavior. You have my vote on this.

john morahan’s picture

Status: Needs work » Needs review
StatusFileSize
new2.86 KB

This version adds a new permission 'edit revisions', users without this permission don't see the "edit revision" links and can't access the node/.../revisions/.../edit forms.

john morahan’s picture

Note that if you go to node/.../edit you are shown the latest revision, and if you have access you also see an 'edit this revision' link pointing to a different revision (the current published revision). However, this problem goes away if you also apply the fix from this issue.

add1sun’s picture

Status: Needs review » Closed (won't fix)

This seems to work as expected in D5 and D6. Closing this as won't fix since D4.7 isn't supported.