Description

When the wiki is on the net within a subdirectory of the domain (i.e. http://myserver/mywiki/moin.cgi), the pagename is put together incorrectly. The script_root (SCRIPT_NAME environ variable) is not stripped of the beginning of the given url, making the renderer think the page is not e.g. FrontPage but mywiki/moin.cgi/FrontPage. On each action (e.g. create page, preview), the script root is prepended another time (making it mywiki/moin.cgi/mywiki/moin.cgi/FrontPage, on next action mywiki/moin.cgi/ ... well you get the idea...).

Thus even creating a page is not possible, making MoinMoin unusable.

I could fix it by patching MoinMoin/wsgiapp.py, function dispatch (line 110) -- if request.path starts with request.script_root, crop that off before doing anything else with the path. (I don't have the exact code available right now but it's easy enough to add).

Steps to reproduce

  1. Install MoinMoin the usual way.

  2. Create a wiki which is accessible via some subpath of the domain.
  3. Try to create a page.

Maybe the problem is restricted to my setup, but I don't think so.

Example

(I'm sorry, the test case is on a server on our company intranet and cannot be made public...)

Component selection

Details

MoinMoin Version

1.9.3 (current release)

OS and Version

Windows Server 2003

Python Version

2.7 (current)

Server Setup

IIS 6.0, no CGI accelerator

Server Details

Language you are using the wiki in (set in the browser/UserPreferences)

de

As mentioned I did not use an accelerator (like ISAPI_WSGI) but mapped .CGI directly to python.exe, as described here: HowTo/MoinOnIIS.

As far as I could see on a quick glance, the code for wsgiapp.py:display(...) is the same in the 2.0-dev branch, so the problem might apply there as well.

Workaround

patch wsgiapp.py as described above

Discussion

Plan


CategoryMoinMoinBug

MoinMoin: MoinMoinBugs/1.9UnusableIfNotAtSiteRoot (last edited 2010-11-05 21:05:38 by ThomasWaldmann)