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:
- Create a page with the new name
- Cut the text from the old page and paste on the new page
Put line like "This page renamed to NewPageName" on the old page.
If acl is enabled, put #acl All:read so people will not add content on the old page
Put a link to the old page on the new page, something like "Rename from OldPageName"
- 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:
RenamePage: Rename a page, after you confirmed it.
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:
- Remove the action from moin_config, as it is not usable at this time
allowed_actions = ['DeletePage', 'AttachFile']
- 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.
- 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
- Priority:
Assigned to: ThomasWaldmann
- Status: fixed in moin--main--1.3--patch-104 (only with config.data_version = 1)