Description

When I rename a page, the page history is lost; I can no longer see the revison history of the page. Furthermore, if I create a new page with the pre-revised name, that new page acquires the history of the previous page!

Example

Hmmmmm... I can't really show an example. The Wiki that's under my control has confidential material and I haven't figured out access control, and this wiki doesn't support the "rename page" action.

Details

MoinMoin Version

revision 1.186, release 1.2.3

OS and Version

SunOS 5.6

Python Version

Python 2.3.3

Server Setup and Version

Apache 1.3.x

Workaround

Don't enable this if version history is important to you.

If you want to rename a page, and needs the version history:

  1. Create a page with the new name
  2. Cut the text from the old page and paste on the new page
  3. Put line like "This page renamed to NewPageName" on the old page.

  4. If acl is enabled, put #acl All:read so people will not add content on the old page

  5. Put a link to the old page on the new page, something like "Rename from OldPageName"

  6. If you need an old revision you can get it from the old page

Discussion

This is why the RenamePage action calls itself a "simple" RenamePage action. It is known that it doesn't do everything you could think of when thinking of "correctly" renaming a page. So this is not quite a bug, but simply a missing feature.

I think its a bug, and a nasty one. The configuration file sais:

    # security critical actions (deactivated by default)
    allowed_actions = ['DeletePage', 'AttachFile', 'RenamePage', ]

No warning, no comment about "Simple rename", so the admin enable it. Even if he look into the help docs, he will find:

A user see RenamePage (not SimpleRenamePage) click and confirm. Then only later, maybe weeks later, he find that the backup versions disappeared. If the admin cleaned the backup directory, probably removing backup to non existing pages, the backup are destroyed.

I think we should:

  1. Remove the action from moin_config, as it is not usable at this time
        allowed_actions = ['DeletePage', 'AttachFile']
  2. Change the docs:
    • RenamePage: Rename a page.

      • <!> Warning: this action does not support backup versions. After renaming, the page will have no version history. Use at your own risk.

  3. Revert those changes after we add the renaming of the backup versions feature.

StorageRefactoring/PagesAsBundles solved this problem automatically, with almost zero page renaming code.

Plan


CategoryMoinMoinBugFixed

MoinMoin: MoinMoinBugs/RenamePageLosesHistory (last edited 2007-10-29 19:20:45 by localhost)