[wp-trac] [WordPress Trac] #16215: Post Revision history displays the incorrect author

WordPress Trac noreply at wordpress.org
Thu Feb 21 15:28:58 UTC 2013


#16215: Post Revision history displays the incorrect author
--------------------------------------------------+-----------------------
 Reporter:  mdawaffe                              |       Owner:  westi
     Type:  defect (bug)                          |      Status:  accepted
 Priority:  normal                                |   Milestone:  3.6
Component:  Revisions                             |     Version:  2.6
 Severity:  normal                                |  Resolution:
 Keywords:  dev-feedback needs-testing has-patch  |
--------------------------------------------------+-----------------------

Comment (by nacin):

 > Currently, when a post is updated, revisions first grabs a copy of the
 current state of the post, stores it as a revision, then updates the post
 row. To fix this bug, we could instead update the post row first then
 store a copy of that new state as a revision. That would mean the most
 recent revision for all posts would be a duplicate of the actual post.

 This was suggested as having cleaner code, but less clean data.

 I want to argue that this is actually the best approach in terms of data
 as well. When talking extensively with benbalter about revisions,
 conflicts, locking, post forking, and editorial flows (author of the Post
 Forking plugin and contributor to both #18515 and #12706), a big issue
 pointed out is that you don't actually have a revision ID in hand until
 the post is edited an additional time. This makes it fairly difficult to
 do anything interesting. Ben ended up writing a routine that calculates
 "what is the revision after revision X, because that's the one I actually
 wanted but it didn't exist at the time, I only had X". Instead of storing
 Y, you have to store X+1. It makes everything simpler if you have a
 revision for everything.

 (Incidentally, _edit_last is also discarded on export/import.)

 IRC conversation: https://irclogs.wordpress.org/chanlog.php?channel
 =wordpress-dev&day=2013-02-13&sort=asc#m554412

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16215#comment:32>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list