Description

misleading message when data_dir exists but not data_dir/pages

Steps to reproduce

  1. create an empty directory c:\tmpWiki
  2. edit wikiconfig.py and set

   1 data_dir = r'c:\tmpWiki'
  1. launch moin.py
  2. try to access moin wiki. The error page is saying that moinmoin does not have permissions on c:tmpWiki instead of saying that tmpWiki\pages does not exists.

Example

Details

error message in multiconfig.py

   1             if not (os.path.isdir(path_pages) and os.access(path_pages, mode)):
   2                 msg = '''
   3 %(attr)s "%(path)s" does not exists, or has incorrect ownership or
   4 permissions.
   5 
   6 Make sure the directory and the subdirectory pages are owned by the web
   7 server and are readable, writable and executable by the web server user
   8 and group.
   9 
  10 It is recommended to use absolute paths and not relative paths. Check
  11 also the spelling of the directory name.
  12 ''' % {'attr': attr, 'path': path,}
  13                 raise error.ConfigurationError(msg)

is misleading as it talks about data_dir instead of data_pages (data_dir/pages).

Either it should be

   1             if not (os.path.isdir(path_pages) and os.access(path_pages, mode)):
   2                 msg = '''
   3 %(attr)s "%(path)s" does not exists, or has incorrect ownership or
   4 permissions.
   5 
   6 Make sure the directory and the subdirectory pages are owned by the web
   7 server and are readable, writable and executable by the web server user
   8 and group.
   9 
  10 It is recommended to use absolute paths and not relative paths. Check
  11 also the spelling of the directory name.
  12 ''' % {'attr': attr, 'path': path_pages,}
  13                 raise error.ConfigurationError(msg)

Or it should test for existance of data_dir then create pages dir if it does not exists.

MoinMoin Version

MoinMoin - 1.5.3 [patch-578; DesktopEdition Release 1.5.3-1]

OS and Version

windows XP

Python Version

2.4.2

Server Setup

Server Details

Workaround

Discussion

Maybe read this again:

Make sure the directory and the subdirectory pages are owned by the web server and are readable, writable and executable by the web server user and group.

So I don't consider this being a bug.

You are expected to follow the installation docs and if you copy the data_dir as described in instance creation part, you don't have that problem anyway.

Plan


CategoryMoinMoinNoBug

MoinMoin: MoinMoinBugs/WrongErrorMessageWhenDataDirPagesDoesNotExist (last edited 2007-10-29 19:10:21 by localhost)