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

WordPress Trac noreply at wordpress.org
Wed Mar 6 04:37:01 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 adamsilverstein):

 16215 comments

  * under the old system when users clicked update on a post the system did
 two things:
   * saved a copy of the post information stored in the database as a
 revision (eg. the previous post update data)
   * saved the current post editor information to the database post record

  This resulted in:
   * revisions stored for the previous edit only, not for the current post
 information
   * however, the current post information IS stored in the database as the
 post data, it's just not stored as a revision
   * in addition, the old system stored two revisions for the first save,
 further confusing things!

  Furthermore:
   * The old revisions compare system did a poor job of displaying the
 revisions, treating the last revision as the current post even though it
 was not, meaning all revisions were one position off - hence the current
 ticket.

  However:
   * The new revision version in #23497 works around this data issue by
 prepending a copy of the current post to the list of revisions when
 building the diffs for display.
   * testing existing post data with the new revisions system the data (i
 believe) looks fine, restores work correctly, and the current version of
 the post is used for comparisons: in the one handle mode the current post
 is compared to all previous revisions; in the two handle mode, the
 leftmost handle position represents the current post version (and data is
 pulled from). the language properly indicates the 'current version' is
 being compared. this could use more testing!

 I already created 16215.5.diff implementing fix 2 above, after this fix
 when users click update on a post the system does two things:
   * saves the post to the database
   * stores a copy of the post data as a revision

 This results in:
  * one revision stored for each update... sounds good so far, except that:
   * the new revision data no longer matches the old revision data, with
 messy results
   * the code adds a new hook and breaks anything that assumes
 wp_save_post_revision is going to run at pre_post_update

 Therefore, I suggest closing this ticked as fixed in #23497, but would
 appreciate a second option on this conclusion

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


More information about the wp-trac mailing list