[wp-trac] [WordPress Trac] #24136: Compare Two mode loads wrong post for left side when another post was created at the same time

WordPress Trac noreply at wordpress.org
Fri Apr 19 15:02:17 UTC 2013


#24136: Compare Two mode loads wrong post for left side when another post was
created at the same time
-----------------------+--------------------------
 Reporter:  westi      |       Type:  defect (bug)
   Status:  new        |   Priority:  high
Milestone:  3.6        |  Component:  Revisions
  Version:  trunk      |   Severity:  critical
 Keywords:  has-patch  |
-----------------------+--------------------------
 In the revisions js we have the following code:

 {{{
 'compareTo': self.revisions.at( self.leftDiff ).get( 'ID' ) - 1,
 }}}

 Performing arbitrary increments or decrements on the ID won't work because
 there is no guarantee that they will be sequential on anything.

 I'm attaching a patch that appears to fix it for me, but I'm not 100%
 convinced of what the logic is here - the JS could use some comments so it
 is clear what is going on.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/24136>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list