On Wed, 10 Jul 2013 16:15:00 +0200 Petko Yotov wrote:
> Sorry if the message is a little technical, please ignore it if it doesn't > concern you. > > A user has demonstrated a bug [1][2] when a page is modified and saved as > draft, then modified and published, then reverted to the pre-draft version: > the restore is incorrect, wrong lines are restored and duplicated, good > lines are missing. > ... > At the moment in the Subversion pre-release I have commented out a line > where PmWiki switches the old version of the draft page with the public > page. (In scripts/draft.php, line 59 commented out.) > > With the current solution (A), it appears really fixed but I'm still > searching for any potential negative side effects ... > > There is another possible solution: (B) done correctly, slightly > more complex to implement: discard all edit history from the > draft page and only store the diff between the published page > and the posted text, keeping only the history of the published > versions. This will not break the restore mecanism. OTOH, this > will lose information about authors of intrermediate edits and > one can wonder if it is ethical. > > My questions are: > > 1. Does anyone see a problem with the current solution (A) ? > > 2. Should we go with (A) or (B) ? Or something else? > > Thanks, > Petko > > [1] http://www.pmwiki.org/wiki/Test/DraftRestore > [2] http://www.pmwiki.org/wiki/PITS/01007 > I did "something else" on an organization's pmwiki site a while ago. I added a checkbox labeled "Consolidate draft history on Publish" to a custom EditForm and modified draft.php to display the checkbox when editing a draft and honor the author's choice when publishing. Please see line 9 of the EditForm at: http://wardsdiskspace.com/pmwikitest/apcu/?n=ChuckG.EditForm?action=source and the (slightly overcommented) PHP script at: http://wardsdiskspace.com/pmwikitest/apcu/uploads/ChuckG/draft.xxphp.txt This has worked correctly since it was installed Sept 2012, however I realize that I don't support a cast of thousands of authors and recipes. Chuck G. _______________________________________________ pmwiki-users mailing list [email protected] http://www.pmichaud.com/mailman/listinfo/pmwiki-users
