Edit revision always shows latest pending revision

Mattias-J - April 9, 2008 - 08:24
Project:Revision Moderation
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

The Edit tab always shows the last revision, no matter if its published or not. Same with Edit revision.

Steps to reproduce:

  1. From a node, make some changes and make sure "Create new revision" and "New revisions in moderation" is checked, and Submit.
  2. Press the edit tab, the edit page is the revision pending for moderation.
  3. Make another change, make sure "Create new revision" and "New revisions in moderation" is checked, and Submit.
  4. Goto Revisions, view the revision second from the top. Click Edit revision. The revision shown is the last changed revision, not the one you choosed to view.

#1

add1sun - December 21, 2008 - 00:44
Status:active» duplicate

I can't reproduce this. The text at the top does say the date and name for the original node, but the node editing itself is whatever revision you clicked on. The textual info at the top has a fix in #174888: revision should identify revision author not the original node author.

#2

Mattias-J - December 21, 2008 - 08:00
Status:duplicate» active

This isn't in the slightest a dupe of #174888: revision should identify revision author not the original node author.

I haven't looked into this for months. To start with, I should state that until after the new year, I'm unable to test the newest revisions of the DEV version.

But what i have access to right now is DEV rev. 1.26.2.13 (2008/01/31) of the revision_moderation.module, and with this one i can still reproduce it. ex.:

1. open a node add "test1" to the node. (and save it as a new unpublised revision)
2. open the unpublised revision, and change the "test1" to "test2" and save this as a new revision.

Result:
Witch ever of this two revisions I open and click "Edit revision", I get "test2" never "test1". The view shows it, but never the edit page.

I'm not sure if I think "Edit" shows the wrong revision, but I'm sure "Edit revision" does.

#3

add1sun - December 21, 2008 - 13:42

Ah, so you edited the *revision*, not the page. Your steps above say "Press the edit tab" which is the main edit, not editing a revision. I'll have to try this again doing that step when I get time.

#4

add1sun - December 21, 2008 - 17:34
Title:Edit and Edit revision show the wrong revisions» Edit revision always shows latest pending revision

Ok, so yes, if you edit a revision, and go back in to edit some more, you will always be served your most recent pending revision for that node. If you go in as a user who *doesn't* have pending revisions, then you will see the text for that particular revision.

The bottom line is that when you edit, you will *always* get your latest pending revision, if you have one, for that node. Period. Even if you select "edit" from a particular revision view. If I am "user_joe" and I a) have a pending revision and b) click "edit revision" for "user_mary"'s revision, I get a message like so:

* You are currently editing a revision of this post created on 12/21/2008 - 17:12 by user_mary.
* Editing your latest revision, which is still pending moderation.

It says I'm editing user_mary's revision AND editing my own latest revision. That's confusing. So, we either need to:
a) allow true editing per revision, regardless of pending revision status or
b) change the action links and text to make it clear what you can really do and what is really going on.

I'm not sure of the implications of doing option A. We really do need to sit down and figure it out though.

#5

rams_yandapalli - December 29, 2008 - 10:55

here i am getting the problem with when we edit revision button the content will automatically going to publishe with out maintaining the version.can you guys suggest me why?

#6

Mattias-J - December 29, 2008 - 12:14

That should have been its own issue, and prob. a support request.

But I guess its that you don't have "Create new revision" set for your content type. That option will give you the revision.
"New revisions in moderation" is needed to actually use this module, and postpone the publication until moderated.

#7

acomer - January 22, 2009 - 00:30

This patch seems to take care of the issue. It adds an option on the module settings page to allow the user to choose the paradigm that works best for them: With this option enabled, when choosing "edit revision" for a specific revision on the list of revisions page, if user has a pending revision for this node, the latest pending revision will be edited instead of the selected revision (current behavior). Leaving the box unchecked will result in editing the selected revision.

AttachmentSize
revision_moderation.module.patch 3.32 KB

#8

Mattias-J - March 2, 2009 - 07:12
Status:active» needs review

Marking this need review, on behalf of acomer.

 
 

Drupal is a registered trademark of Dries Buytaert.