We relaunched the TWiki.org project with an expanded TWiki charter, and we invite you to participate! The TWiki.org Code of Conduct agreement took effect on 27 Oct 2008. We ask existing twiki.org users to opt-in. You need to opt-in to participate in the Blog, Codev, Plugins and TWiki webs. -- PeterThoeny - 27 Oct 2008
Tags:
create new tag
, view all tags

Bug: Sidebar is constructed erroneously when non-web directories are present

When the data directory contains subdirectories that do not represent webs (e.g., a CVS directory), the side bar will show the name of the directory, a newline, and then a question mark. Clicking on the question mark will try to create a WebHome topic in that directory.

While the behavior of offering to create a WebHome topic might seem reasonable, probably it is not. If a directory does not contain a WebHome topic, likely it is not intended to be a Web. If somebody were to create a new web, they would usually copy over the files from the default web, rather than just creating an empty directory.

I would suggest that links are not created for subdirectories in data which do not contain a WebHome topic.

Test case

Environment

TWiki version: TWikiBetaRelease2004x10x30
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: WinXP?
Web server: Apache 1.3.29
Perl version: 5.8.5
Client OS: WinXP?
Web Browser: IE

-- ThomasWeigert - 27 Dec 2004

Follow up

sounds reasonable to me. just make sure to check for %HOMETOPIC% rather than a hard-coded WebHome

-- WillNorris - 03 May 2005

 

Fix record

SVN 4341:

Index: Store.pm
===================================================================
--- Store.pm    (revision 4340)
+++ Store.pm    (working copy)
@@ -1193,8 +1193,7 @@
     $filter ||= '';

     opendir DIR, "$TWiki::cfg{DataDir}" ;
-    my @webList = grep { !/^\./ &&
-                           -d "$TWiki::cfg{DataDir}/$_" } readdir( DIR );
+    my @webList = grep { -e "$TWiki::cfg{DataDir}/$_/WebHome.txt" } readdir( DIR );
     closedir( DIR );

     if ( $filter =~ /\buser\b/ ) {

CrawfordCurrie did a more extensive (and more proper) fix in SVN 4351

Topic revision: r6 - 06 Jun 2005 - 21:12:34 - WillNorris
 
TWIKI.NET
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback