Bug: WebExist uses WebPreferences as opposed to WebHome to determine the validity of a web
The webExists ObjectMethod in Store.pm uses the existence, in the subdirectories of the data directory, of the webpreference topic (as configured in $TWiki::cfg{WebPrefsTopicName}) to determine whether that subdirectory is in fact a valid web. I'm not sure if this is a problem in itself (whether the
WebPreferences page should be essential to a web) but all the in code documentation I've seen indicates that the web validity test is based on the existence of the
WebHome topic in the subdirectories of 'data'.
Test case
1) manually create a subdirectory in data called
TestWeb
2) Create a file in this directory entitled
WebHome.txt
3) check the resolved value of the WEBLIST variable (maybe put it in a page or something -_-) and notice that
TestWeb is not listed.
4) Rename this
WebHome.txt to
WebPreferences.txt
5) refresh the WEBLIST page and see
TestWeb listed
--
SethTownsend - 20 Jun 2006
This is a problem with the documentation, not the code! The reason WebPreferences is used is that a web that contains WebPreferences but not WebHome can function happily as a web, but a web with WebHome but no WebPreferences cause all sorts of problems with preferences and protections.
CC
There was only one place where it was stated in the code docs, and that was in Store. Corrected.
CC