Edgewall Software

Ticket #1114 (closed enhancement: fixed)

Opened 4 years ago

Last modified 2 years 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:

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 2 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 2 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.

Change History

  Changed 4 years ago by anonymous

  • status changed from new to closed
  • resolution set to invalid

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

  Changed 4 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.

  Changed 2 years ago by pavel.simerda@…

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

  Changed 2 years ago by cmlenz

  • status changed from closed to reopened
  • type changed from defect to enhancement
  • resolution invalid deleted
  • milestone set to 0.10

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.

  Changed 2 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?

  Changed 2 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 2 years ago by cboos

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

  Changed 2 years ago by cboos

  • keywords review added
  • status changed from new to assigned

Proposed implementation: attachment:wiki_delete_version_range-r3430.patch

Feedback welcomed.

  Changed 2 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.

follow-up: ↓ 13   Changed 2 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 2 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.

  Changed 2 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.

  Changed 2 years ago by ThurnerRupert

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

  Changed 2 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.

in reply to: ↑ 9   Changed 2 years ago by cboos

  • keywords review removed
  • status changed from assigned to closed
  • resolution set to fixed

Replying to comment:9

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

Applied in r3474.

Add/Change #1114 (Need an easy way to revert wiki pages)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.