• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item4559: Default topic wrong for Sub Webs without trailing slash

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Normal No Action Required   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail


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

ItemTemplate
Summary Default topic wrong for Sub Webs without trailing slash
ReportedBy TWiki:Main.BobGoldstein
Codebase 4.1.2
SVN Range TWiki-4.2.0, Wed, 05 Sep 2007, build 14735
AppliesTo Engine
Component

Priority Normal
CurrentState No Action Required
WaitingFor

Checkins

TargetRelease n/a
ReleasedIn

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r6 - 2007-09-15 - SteffenPoulsen
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback