#10099 closed enhancement (fixed)
Simplify reverting a wiki page to an earlier version
Reported by: | Remy Blank | Owned by: | Remy Blank |
---|---|---|---|
Priority: | high | Milestone: | 1.0 |
Component: | wiki system | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: |
wiki: Simplified reverting of a wiki page to an older version. |
||
API Changes: | |||
Internal Changes: |
Description
I may be missing something obvious, but reverting a wiki page to a previous version currently involves the following procedure:
- Display the version to revert to.
- Download the source text as "Plain Text".
- Edit the page, delete the text and paste the downloaded text.
I would have expected that clicking on "Edit this page" on an old version would show the editor with the old text, but this is not the case.
I suggest changing the "Edit this page" button into "Revert to this version" when viewing an old version of a page, and to behave as expected above when that button is clicked.
Patch coming up shortly.
Attachments (1)
Change History (5)
comment:2 by , 14 years ago
10099-wiki-revert-r10656.patch changes the "Edit this page" to "Revert to this version" when viewing an older version of a wiki page. When clicking the button, it opens the editor for a new version, with the text from the old version. From there, all the usual operations are possible, like viewing the diff.
(The big hunk in wiki_view.html
around the "Delete" button is only a simplification and has nothing to do with this functionality.)
comment:3 by , 14 years ago
Looks good, successfully tested.
One thing's missing though: the UEB support! Clicking on the UniversalEditButton makes you edit the latest version, as before. I think that for consistency it should also make you revert to the version being viewed.
-
trac/wiki/templates/wiki_view.html
diff -r 7c397fb1b559 trac/wiki/templates/wiki_view.html
a b 12 12 <title py:if="title">$title</title> 13 13 <meta py:if="version or page.author == 'trac'" name="ROBOTS" content="NOINDEX, NOFOLLOW" /> 14 14 <link py:if="admin_perm or (not page.readonly and modify_perm)" rel="alternate" type="application/x-wiki" 15 title="Edit this page" href="${href.wiki(page.name, action='edit' )}" />15 title="Edit this page" href="${href.wiki(page.name, action='edit', version=version)}" /> 16 16 <script type="text/javascript"> 17 17 jQuery(document).ready(function($) { 18 18 $("#content").find("h1,h2,h3,h4,h5,h6").addAnchor(_("Link to this section"));
comment:4 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Good catch! Thanks for testing. I have also changed the title of the link in the case where it would edit an old version of the page.
Patch committed in [10659].
What I usually do is simply to delete the unwanted latest versions.
But it's true that there are situations when the change to revert is not vandalism but simply a wrong information, and restoring the previous content is better accompanied in this case by a comment stating why the change was reverted.
In addition, with alternative TracDev/Proposals/WikiStorage that don't support version deletion, this feature will be the only way to quickly revert vandalism.