NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use trunk.foswiki.org to view this page for some minimal testing.
Use Item9693 for docu changes for 1.2 and 2.0.

Item3908: Possible to set a topic parent to itself

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Low New Engine    
This is mainly a UI errror. It can be prevented by omitting the current topic from TOPICLIST, for instance with an omittopic parameter.

-- TWiki:Main/ArthurClemens - 15 Apr 2007

we should protect against this in the save code (or topic meta) too really, as this is a 'data integrity' issue.

-- TWiki:Main.SvenDowideit - 16 Apr 2007

This is the simplest possible example of a cycle in parent relationships. Anything that uses parent relationships needs to be aware of the possibility of cycles; I don't think it's TWiki's job to ensure that there are none in the saved data, even if it could. I'm going to reject this. If you can justify why I shouldn't, then please re-open it.

-- TWiki:Main.CrawfordCurrie - 26 Apr 2007

You can at least prevent the current topic from being selected as parent.

-- TWiki:Main.ArthurClemens - 26 Apr 2007

I had a problem with such a dependency. I know it was my fault but I think TWiki should not allow to do what I have done. I have removed the topic "WebHome" of a web because the only child (let's call that topic "Child") of that topic should be moved to "WebHome" in order to keep the history. The parent of Child was WebHome so after the move of Child to WebHome was it's own parent. I could not change the dependency because the topic could not be shown anymore. I had to change the file directly on the server. At first, I did not even know why the topic was hanging. I think TWiki should not allow that a topic is its own parent. There should be a check and a error message.

-- TWiki:Main.KirstinWeber - 30 Jul 2008

This means there are 3 use cases (up to now) where a topic can be set as parent to itself:
  1. Setting a parent through the interface (dropdown list)
    • Topic list can be altered, so not to show the current topic
  2. Setting a parent through a web form, setting topicparent
    • Could give a warning (oops?)
  3. Renaming a topic to its parent
    • Should be handled by the renaming code, possibly a warning

-- ArthurClemens - 18 Nov 2008 - 21:42

ItemTemplate edit

Summary Possible to set a topic parent to itself
ReportedBy TWiki:Main.ArthurClemens
Codebase
SVN Range TWiki-4.1.2, Sun, 15 Apr 2007, build 13419
AppliesTo Engine
Component
Priority Low
CurrentState New
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn
Topic revision: r7 - 11 Dec 2008, UnknownUser
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons LicenseGet Foswiki at sourceforge.net. Fast, secure and Free Open Source software downloads