Edgewall Software
Modify

Opened 19 years ago

Closed 18 years ago

Last modified 13 years ago

#1114 closed enhancement (fixed)

Need an easy way to revert wiki pages

Reported by: anonymous Owned by: Christian Boos
Priority: normal Milestone: 0.10
Component: wiki system Version: 0.8
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

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.

Attachments (2)

wiki_delete_version_range-r3430.patch (4.8 KB ) - added by Christian Boos 18 years ago.
Implement deletion of the range of versions currently visualized in the wiki diff view
wiki_delete_version_range-r3431.patch (5.9 KB ) - added by Christian Boos 18 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.

Download all attachments as: .zip

Change History (18)

comment:1 by anonymous, 19 years ago

Resolution: invalid
Status: newclosed

Cancel that: I just found the "Download in other formats: Plain Text" option.

comment:2 by Christopher Lenz, 19 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 pavel.simerda@…, 18 years ago

I'd suggest also a way to quickly revert the page. Kid.lesscode.org has been vandalized thoroughly.

comment:4 by Christopher Lenz, 18 years ago

Milestone: 0.10
Resolution: invalid
Status: closedreopened
Type: defectenhancement

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 Christian Boos, 18 years ago

Owner: changed from Jonas Borgström to Christian Boos
Status: reopenednew

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 Matthew Good, 18 years ago

Deleting revisions is fine when they're the latest revisions, but just deleting old revisions is usually not sufficient:

  1. initial content
  2. spammed
  3. 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 Christian Boos, 18 years ago

Implement deletion of the range of versions currently visualized in the wiki diff view

comment:7 by Christian Boos, 18 years ago

Keywords: review added
Status: newassigned

Proposed implementation: attachment:wiki_delete_version_range-r3430.patch

Feedback welcomed.

comment:8 by Matthew Good, 18 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.

comment:9 by Christian Boos, 18 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 Christian Boos, 18 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 ThurnerRupert, 18 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 ThurnerRupert, 18 years ago

this would be also a natural extension for #2165 and #3250.

comment:12 by Christian Boos, 18 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.

in reply to:  9 comment:13 by Christian Boos, 18 years ago

Keywords: review removed
Resolution: fixed
Status: assignedclosed

Replying to comment:9

… Updated patch: attachment:wiki_delete_version_range-r3431.patch

Applied in r3474.

comment:14 by anonymous, 14 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 anonymous, 14 years ago

I have the same question as above.

comment:16 by DavidCary, 13 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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.