Restoring After Using Drafts
Restoring to a prior published state fails after saving drafts and publishing
Restoring to a prior published state fails after saving drafts and publishing
See page history:
- Published original file with lines 01-10.
- Added two lines, saved draft.
- Deleted two lines, saved draft.
- Modified one line, published.
- Restored to state after first publish.
We should be back to lines 01-10. Instead, lines 03-04 are missing and lines 05-06 are duplicated.
Line 01 Line 02 Line 03 Line 04 Line 05 Line 06 Line 07 Line 08 Line 09 Line 10
This is a result of the problem described in PITS.01007.
Thanks for showing us this bug. It appears that it comes from the fact that the very last diff PmWiki stores is not between the previous version of the draft and the current posted text (a), but between the previous version of the published page and the posted text (b). So, this is clearly a bug and for the moment I've fixed it in SVN by enabling (a) but I still have to think if there are no side effects. There is another way of dealing with this, suggested on the PITS page, notably dropping all intermediate draft changes and storing a single atomic diff between published versions. One problem with this solution is that information about authors of the draft edits is lost. I'll ask the community how we should deal with it on the mailing lists. You may want to join the [pmwiki-users] list and/or test the SVN pre-release (only scripts/draft.php changed). --Petko July 09, 2013, at 03:15 PM