Managing Topics

Browser-based rename, move, copy, and delete for individual topics


You can use browser-based controls to change a name of a topic, move it to another web or delete it to a hidden Trash web.

How to rename or move a topic

  1. Select the [More actions] link (normally located in an action toolbar at the top or bottom of page) on the topic to be changed. Then, in the new screen, click [Rename or move topic...] or [Delete topic...]. You can now rename and/or move in one operation:
    • Move: Select the target web if other than the current web
    • Rename: Enter the new topic name - default is current name
      ALERT! You'll be warned if any of the topics to be affected are locked (being edited), or if there is a name conflict.
  2. Prevent updates by unchecking individual items on the list of referring links - these topics will NOT to be updated with the new name (by default, only links in the same web will be updated).
  3. Click on [Rename]: the topic will be renamed and links to the topic updated as requested.
    • If any of the referring pages are locked then they will be listed: you can correct these later by again pressing [Rename].
      HELP There is a Put back feature that allows you to undo a rename/move/delete action - an instruction line and an undo link will appear at the bottom of the modified topic. This allows you to revert from the last modification only.

How to delete a topic

Foswiki deletes topics by moving them to the hidden Trash web.
  1. Select the [More actions] link (normally located in an action toolbar at the top or bottom of page) on the topic to be changed. Then, in the new screen, click [Delete topic...]. That will bring up the "rename" form prepopulated with the Trash web and a suitable topic name.
  2. Click on [Delete]: the topic will be renamed and moved to the Trash web as requested.

How to copy a topic

  1. Select the [More actions] link (normally located in an action toolbar at the top or bottom of page) on the topic to be changed.
  2. On the "More actions" page, scroll down to the "Copy topic" section. In the "Name of copy" text box, enter in the new topic name. To copy the topic to another web, fully qualify the topic name with the web name, separating the two with a period (for example, Web.TopicName).
  3. Select the [Copy topic] button. You will be directed to an edit page for the newly-created topic. You can save the new copy immediately, or make some changes and then save it.

Deleted topics: How to clear the trash

Deleted topics are moved to a special Trash web - they are NOT physically erased from the server. All webs share the same Trash - in case of a name conflict with a topic already existing in the Trash web, the user is alerted and asked to choose a new name.

The Trash web should be be cleared periodically, by archiving (saving) the text and RCS files if required (recommended), then deleting them from the Trash directory.

ALERT! This can only be done from on the server, not through the browser.

TIP Since simple FTP access to the Trash directory is all that is required for maintenance, it is possible to grant Trash admin privileges to multiple users, while strictly limiting server access.

Redirecting from an old topic

The default "new topic" screen tells the user when a topic being created used to exist, but was moved. So if anyone follows a link to a moved topic, they will be able to click through to the new name.

How rename/move works

  1. %SEARCH%, with a special template, finds and displays all occurrences of the topic name in other topics, either web- or site-wide. These referring links are by default automatically changed to the new topic and/or web name. This includes relevant MetaData definitions.
    • User can omit one or more topics from the update list by unchecking them.
    • <pre> and <verbatim> are honoured - no changes are made to text within these areas.
      ALERT! Foswiki will therefore not change any references in macros defined in <pre> and <verbatim> blocks
  2. The topic is moved (if locks allow).
  3. References are changed (locks and permissions permitting).
  4. Any referring topics that cannot be changed due to locks are listed - user can take note and change them at another time.

How referring topics are found

First, matching topics in the current web are listed - matches are to topic. Next, all webs (including the current one) are listed that match web.topic. All webs will be searched during rename, even if NOSEARCHALL is defined on a web, though access permissions will of course be honoured.

Changed references are kept as short as possible, for example: topic is used in preference to web.topic.

Effect of user access settings

User permissions affect the 'rename' functions in various ways. To rename a topic, you need all of VIEW, CHANGE and RENAME access to that topic. To alter referring topics, you need CHANGE access. See AccessControl for information on setting up access permissions.

Special considerations

Consider carefully whether to make browser-based rename/move/delete widely available, or to restrict it to an administrator/moderator group. Allowing all users to easily manipulate topics can be extremely useful in refactoring a busy web or site. However, there are at least two significant potential drawbacks to take into account:
  1. When referring links are updated, the modified topics appear in WebChanges, creating the impression that editorial changes were made. This can undermine the usefulness of WebChanges.
  2. Due to current limitations, fairly heavy use of rename/move/delete functions can lead to an accumulation of minor technical problems (such as broken links) and usability issues (e.g. user confusion). If rename... is used heavily, these negatives will obviously increase, in number and effect.

Ultimately, the size, objectives, and policies of your site, the real-world behavior of your user group, and most importantly, the initial Foswiki site management leadership, will determine the most effective implementation of this feature, and the success of the site overall.

Known issues

Rename/move is fairly complicated due to the dynamic generation of links. Ideally, it would be possible to run the required part of rendering in a way that would allow identification of the text to be changed. Unfortunately, these hooks don't exist at present. Instead, %SEARCH% is used with a special template to show the text to be changed, and the selected topics are then altered. One drawback is that search can show matches that will not be updated due to case differences. Other mismatches with actual rendered output are also possible as the approaches are so different.

The following shows some limitations of square bracket processing.

[[Old Topic]]  => [[NewTopic][Old Topic]]
[[old topic]]  => [[NewTopic][old topic]]
[[old t opic]] => not changed
[[OldTopic]]   => [[NewTopic]]

Reviewing and Reverting

Foswiki's revision control saves all topic changes. To view earlier versions of a topic, click on the History link in topic actions. If you would like to revert to an earlier version or reclaim part of an earlier version, just copy from the old topic revision to the current topic revision as follows:
  1. In the History view, click the revision number you want to reclaim from
  2. Select and copy to clipboard either the portion of that version you want to reclaim or the entire text of the topic if you want to revert completely to that version.
  3. Edit the topic and paste in the portion you wish to reclaim or replace the entire text with the text you copied from the earlier version.
  4. Save the topic.
See: ManagingTopics for more details.

Related Topics: UserDocumentationCategory, AdminDocumentationCategory
Topic revision: r1 - 20 Sep 2010, ProjectContributor

This site is powered by FoswikiCopyright © 2013-2020 by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding Vanderbilt Biostatistics Wiki? Send feedback