Edgewall Software
Modify

Ticket #1114 (closed enhancement: fixed)

Opened 7 years ago

Last modified 13 months ago

Need an easy way to revert wiki pages

Reported by: anonymous Owned by: cboos
Priority: normal Milestone: 0.10
Component: wiki system Version: 0.8
Severity: normal Keywords:
Cc:
Release Notes:
API 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

wiki_delete_version_range-r3430.patch (4.8 KB) - added by cboos 6 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 cboos 6 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

comment:1 Changed 7 years ago by anonymous

  • Resolution set to invalid
  • Status changed from new to closed

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

comment:2 Changed 7 years ago by cmlenz

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 Changed 6 years ago by pavel.simerda@…

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

comment:4 Changed 6 years ago by cmlenz

  • Milestone set to 0.10
  • Resolution invalid deleted
  • Status changed from closed to reopened
  • Type changed from defect to 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 Changed 6 years ago by cboos

  • Owner changed from jonas to cboos
  • Status changed from reopened to 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 Changed 6 years ago by mgood

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.

Changed 6 years ago by cboos

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

comment:7 Changed 6 years ago by cboos

  • Keywords review added
  • Status changed from new to assigned

Proposed implementation: attachment:wiki_delete_version_range-r3430.patch

Feedback welcomed.

comment:8 Changed 6 years ago by mgood

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 follow-up: Changed 6 years ago by cboos

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

Changed 6 years ago by cboos

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 Changed 6 years ago by ThurnerRupert

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 Changed 6 years ago by ThurnerRupert

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

comment:12 Changed 6 years ago by cboos

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 in reply to: ↑ 9 Changed 6 years ago by cboos

  • Keywords review removed
  • Resolution set to fixed
  • Status changed from assigned to closed

Replying to comment:9

...
Updated patch: attachment:wiki_delete_version_range-r3431.patch

Applied in r3474.

comment:14 Changed 22 months ago by anonymous

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 Changed 19 months ago by anonymous

I have the same question as above.

comment:16 Changed 13 months ago by DavidCary

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.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from cboos. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.