These urls work:
....bin/view
....bin/view/WebOne
....bin/view/WebOne/WebTwo/
But this is broken:
....bin/view/WebOne/WebTwo
Because TWiki doesn't realize, without the trailing slash, that
WebTwo is a directory (sub web),
and thinks it is a non-existent topic. Here is a diff that fixes this issue:
* junk 2007-09-06 10:23:52.857581000 -0500
--- TWiki.pm 2007-09-06 10:23:17.656511000 -0500
***************
*** 1313,1318 ****
--- 1313,1322 ----
# is 'bin/script/Webname' or 'bin/script/'
$web = $1 unless $web;
}
+ if ($topic and -d "$TWiki::cfg{DataDir}/$web/$topic") {
+ $web .= "/$topic";
+ $topic = '';
+ }
# All roads lead to
WebHome$topic = $TWiki::cfg{HomeTopicName} if ( $topic =~ /\.\./ );
--
TWiki:Main/BobGoldstein - 06 Sep 2007
But with this "fixed" you cannot make a topic with the same name as a subweb. Or worse. If you have a topic - and then add a subweb with the same name then you cannot reach the original topic.
I believe this was discussed more than once and the current behavior accepted as the right one.
Perhaps some of the other developers can confirm and if I am right put it in No Action Required.
--
TWiki:Main.KennethLavrsen - 06 Sep 2007
I always find it confusing when a url depends on the presence of a trailing slash. And in this case, where it works for a top-level web and not a subweb. Personally, I wouldn't be bothered by a restriction disallowing a topic and subweb of the same name. However, I'm a TWiki newbie, so I'm sorry if I brought up something that was decided a while ago.
--
TWiki:Main.BobGoldstein - 07 Sep 2007
I actually agree with Bob - I'm not fond of the fact that you can define a topic the same name as a web - it leads to serious confusion when you create a web per user, instead of a user topic, as
some of the code grabs info from the user topic, and some from the web!
The current behaivour was what was implemented, but
why? and if ti was the right decision, will require a bit more examination
Atm, I'm leaning toward making them exclusive, and if you create a subweb where a topic exists, that topic gets moved into the new web (either as webhome, or webpreferences...).... mmm, can of worms .
--
TWiki:Main.SvenDowideit - 15 Sep 2007
For the record - I do not have any real oppinion on this.
I was just referring to the discussion between a few developers about one year ago.
If changes are made make sure they are compatible. Ie. make sure no links stop working because of a trailing / or lack of it.
--
TWiki:Main.KennethLavrsen - 15 Sep 2007
I think the current behaviour is very consistent (won%27t think up magic fallbacks or change behaviour if a topic or web does / does not exist).
This should be proposed / discussed in Codev.
--
TWiki:Main.SteffenPoulsen - 15 Sep 2007