Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #16215, comment 42

03/20/13 16:53:31 (13 months ago)


  • Ticket #16215, comment 42

    initial v1  
    22> What's the status on getting this fixed for '''existing posts'''? 
    4 thought it was fixed, but possibly missed something.   
    6 once a post is updated its revision dataset is corrected. before that 1st update, older posts do not contain a revision that is 'current' - containing the same data as the post. the new revisions system (is supposed to) take care of this by inserting a copy of the current post as a revision in the returned list (although not actually adding it to the revisions table). i could fix the data there instead of inserting the post data copy. 
     5ignore my previous response, thought you were asking on backbone ticket. 
    8 now that i have ironed out (i hope) all the comparison and switching issues i will revisit some old revision datasets to see if this is in fact working. did you have a test case that failed to work properly? 
     7latest patch on this ticket does correct data for existing posts, the first time a post is updated. 
    10 one possible issue would be restoring a revision from an old post before an update - this would leave a 'gap' in the list of revisions for the current revision (before restore). another issue that is not corrected is that old revisions would store a revision even if nothing had changed in the post. the new code does nothing to clean this up, so old revisions will include some that contain no changes. 
     9had asked @nacin about upgrading post data on WordPress database upgrade, but he said no. all thats required is running wp_save_post_revision on every post. wp_save_post_revision checks if a current post copy exists as a revision and saves a copy if not.