Download & Extend

"Editing your latest revision" only applies to items created after installation of Revision Moderation module

Project:Revision Moderation
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

The following applies to users whose edits are moderated. That is, users who don't have admin node privileges.

For content items created after installation of the Revision Moderation module...
When you edit a content item, you are always editing either your own most recent revision (if no revision has been published since your most recent edits) or the latest published revision (if any revision has been published since you last edited the content item.)* If it's the former, you will see a message on the edit form that says "Editing your latest revision, which is still pending moderation." In other words, when you get to the edit form for a particular content item, you are always editing the last published revision... unless you yourself submitted a revision that has not yet been published, in which case you are editing that un-published revision and you will see "Editing your latest revision, which is still pending moderation."

For content items created before installation of the Revision Moderation module...
When you edit a content item, you are always editing the latest published version, even if you have submitted a revision that hasn't been published.

In other words, the module behaves differently for items created before installation of the module. This is bound to be confusing to the user and makes writing documentation difficult.

Comments

#1

confirmed but haven't looked in to how it can be addressed.

#2

Seems the workaround mentioned below works for this case as well

#333311: Actions not applied to nodes created before installation of module

#3

Status:active» needs review

Attached patch checks if the node being updated exists in the revision_moderation table, otherwise it adds it, which seems to solve this issue. Please review.

AttachmentSize
290648-node-revisions-add-old-node.patch 972 bytes

#4

I couldn't apply the patch (is it a diff in the opposite direction?) but adding the 4 lines manually seems to solve the problem, so the fix is good.

#5

The patch is indeed in the wrong direction. But I've also manually added the appropriate lines and the fix appears to be good.

#6

Status:needs review» needs work

Needs a working patch...

#7

Status:needs work» needs review

Here's a patch in the right direction. Sorry about the last one.

AttachmentSize
290648-node-revisions-add-old-node_1.patch 1.22 KB

#8

Status:needs review» reviewed & tested by the community

Works well, thanks!

#9

Status:reviewed & tested by the community» fixed

Committed thanks!

I have been pondering if we should do this upon installation but that presents some challenges in enabling the module on a large site with many nodes. This seems a sensible approach.

#10

Status:fixed» closed (fixed)

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