Opened 18 years ago
Closed 17 years ago
Last modified 12 years ago
#1114 closed enhancement (fixed)
Need an easy way to revert wiki pages
|Reported by:||anonymous||Owned by:||Christian Boos|
This page has been vandalised: http://projects.edgewall.com/trac/wiki/TracUsers?version=35
Unfortunately, there's no easy way to revert to a previous version. You can view the rendered HTML of previous versions, but you can't directly access the Wiki markup for those pages - so you can't just copy and paste the old markup in to the "edit this page" box. I suggest providing a way of viewing the Wiki markup for any previous version of a Wiki page.
Change History (18)
comment:1 by , 18 years ago
|Status:||new → closed|
comment:2 by , 18 years ago
Also not that as an admin (i.e. with WIKi_ADMIN permissions) you are able to delete individual versions of a page by the click of a button. Deleting the latest version of a page effectively reverts that page to the previous version.
comment:3 by , 17 years ago
I'd suggest also a way to quickly revert the page. Kid.lesscode.org has been vandalized thoroughly.
comment:4 by , 17 years ago
|Status:||closed → reopened|
|Type:||defect → enhancement|
I also found that it'd be nice if we provided a "Revert change(s)" button on the wiki diff page, and also on the wiki page history page, the latter providing the option of reverting the selected span of changes.
comment:5 by , 17 years ago
|Status:||reopened → new|
I don't like so much the idea of deleting a range of pages from the history: you'd better be sure about what you delete. So why not deleting the version(s) from the diff page only, which can also be the diff for a range?
comment:6 by , 17 years ago
Deleting revisions is fine when they're the latest revisions, but just deleting old revisions is usually not sufficient:
- initial content
- valid additions
You can't just delete revision 2 since revision 3 also has the spam content in it. So, to revert 2 you'd need to apply a reverse diff onto the current page.
I actually like the idea of using the diff page to revert a set of revisions, since I typically have to go through the diffs anyways to make sure I know what I'm going to delete.
by , 17 years ago
Implement deletion of the range of versions currently visualized in the wiki diff view
comment:7 by , 17 years ago
|Status:||new → assigned|
Proposed implementation: attachment:wiki_delete_version_range-r3430.patch
comment:8 by , 17 years ago
As I said before, it's not a good idea to delete revisions from the middle of a page's history. Deleting revisions from the end of the history is ok, or possibly from the middle if there was no net change (changed then removed change). This is actually already a problem with the current revision deletion.
follow-up: 13 comment:9 by , 17 years ago
As I said before, it's not a good idea to delete revisions from the middle of a page's history … or possibly from the middle if there was no net change
That's actually the scenario I had in mind. You sometimes have some spam or simply noisy changes, that are later removed in subsequent revisions, and after that you have some valid changes. An admin may find useful to prune the history by removing the range of senseless revisions that occurred before the last interesting revisions. Doing so from the diff view as proposed by the patch makes that relatively safe, but as you suggest, we can make that even safer by enabling the delete only if there are no actual changes. A corollary change would be to disable deletion of single version from the middle of the history, as there are always some changes in that case.
Updated patch: attachment:wiki_delete_version_range-r3431.patch
by , 17 years ago
previous patch updated to take into account mgood's feedback: revision ranges deletions from the middle of the history are prohibited unless this corresponds to no net change.
comment:10 by , 17 years ago
the mediawiki approach seems also very practical. if you browse through the changes of a wiki page with "previous change" - "next change", you have an additional link "store this version" or "rollback to this version". this leaves the history completely intakt.
comment:11 by , 17 years ago
comment:12 by , 17 years ago
The problem with deleting just one version in the middle of the history is that it's likely that subsequent revisions will also contain the changes you wanted to delete… so doing this deletion doesn't really help.
Unless you actually have a range of revisions in the middle of your history that amount to no net changes. In this case, it can be useful to prune those useless revisions from your history.
comment:13 by , 17 years ago
|Status:||assigned → closed|
Replying to comment:9
… Updated patch: attachment:wiki_delete_version_range-r3431.patch
Applied in r3474.
comment:14 by , 13 years ago
So how do you revert exactly? — I clicked on "View changes" under history for page and I don't see a revert button anywhere?
comment:15 by , 13 years ago
I have the same question as above.
comment:16 by , 12 years ago
Q: How do you revert to a previous version? A: Like this:
- Starting from the current version of a page, click "history"
- click the version number you want in the "version" tab
- IGNORE the "Edit this page" button at the bottom. When will someone will fix that button so that it does "Edit this version of this page"? It currently does something completely useless.
- Instead, just under where it says "Download in other formats", click on "Plain Text".
- Do ctrl+a ctrl+c to copy all the text (including wiki markup) for that version of the page to your clipboard
- Hit your back button a few times until you get to the current version of the page.
- Hit the "Edit this page" button.
- Do ctrl+a , then hit the backspace button to wipe out the current version.
- Do ctrl+v to paste in the old version (hopefully still in your clipboard)
- hit the "preview page" and "review changes" button to see if it looks OK
- In the comment box, fill in "revert to" and the version to which you reverted.
- Hit the "submit changes" button.
While I am super-happy that this give me a way to revert vandalism and spam, I still think that perhaps it could be a little easier.
Cancel that: I just found the "Download in other formats: Plain Text" option.