Edgewall Software
Modify

Opened 15 years ago

Closed 14 years ago

#8875 closed defect (fixed)

trac.wsgi does not work with multiple projects

Reported by: Michel Jouvin <jouvin@…> Owned by: Michel Jouvin <jouvin@…>
Priority: high Milestone: 0.12.1
Component: web frontend Version: none
Severity: trivial Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

The template for trac.wsgi has a typo (in r8872, never used it before) which breaks the support for multiple projects: tt uses to trac.env_path_parent_dir instead of trac.env_parent_dir leading to an error in trac.web.main when trying to open the environment. This options is also undocumented in the mod_wsgi page.

BTW, the documentation about mod_wsgi support in Trac is very basic. In particular it suggests to define PYTHON_EGG_CACHE where probably it's better to use WSGIPythonEggs in embedded mode or the python-eggs option of daemons. If there is a good reason not to do it, it's probably worth documenting it too…

Attachments (0)

Change History (8)

comment:1 by Michel Jouvin <jouvin@…>, 15 years ago

My somebody apply this patch to the trunk, this bug is annoying as it requires an edit at each upgrade and IMO is very trivial!

--- lib/python2.4/site-packages/Trac-0.12dev_r8912-py2.4.egg/trac/admin/templates/deploy_trac.wsgi      2009-12-05 09:40:56.000000000 +0100
+++ lib/python2.4/site-packages/Trac-0.12dev_r8912-py2.4.egg/trac/admin/templates/deploy_trac.wsgi.fixed        2009-12-16 08:25:48.000000000 +0100
@@ -17,7 +17,7 @@
 import os
 
 def application(environ, start_request):
-    if not 'trac.env_path_parent_dir' in environ:
+    if not 'trac.env_parent_dir' in environ:
         environ.setdefault('trac.env_path', '${env.path}')
     if 'PYTHON_EGG_CACHE' in environ:                                           
         os.environ['PYTHON_EGG_CACHE'] = environ['PYTHON_EGG_CACHE']

comment:2 by Michel Jouvin <jouvin@…>, 15 years ago

Component: generalweb frontend
Priority: normalhigh

comment:3 by Remy Blank, 15 years ago

Owner: set to Remy Blank

Thanks for the patch.

comment:4 by Remy Blank, 15 years ago

Resolution: fixed
Status: newclosed

Patch applied in [8958]. Thanks!

comment:5 by Remy Blank, 15 years ago

Owner: changed from Remy Blank to Michel Jouvin <jouvin@…>

comment:6 by Lele Gaifax, 14 years ago

The problem seems still present: the same change is required a few lines below (source:trunk/trac/admin/templates/deploy_trac.wsgi#L28).

comment:7 by Remy Blank, 14 years ago

Milestone: 0.120.12.1
Resolution: fixed
Status: closedreopened

Right, my bad. I should have checked more carefully.

comment:8 by Remy Blank, 14 years ago

Resolution: fixed
Status: reopenedclosed

Fixed in [9947].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Michel Jouvin <jouvin@…>.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Michel Jouvin <jouvin@…> to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.