Edgewall Software
Modify

Opened 20 years ago

Closed 20 years ago

Last modified 7 years ago

#1143 closed defect (fixed)

Editing of Milestones does not work while running under mod_python

Reported by: aashley@… Owned by: Christopher Lenz
Priority: normal Milestone: 0.8.1
Component: web frontend/mod_python Version: 0.8
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Our system is setup with trac running under mod_python with it setup to be accessible as the root dir of a virtual host (http://trac/ on our internal network).

When accessing trac through this URL none of the edits to a milestone are saved. Everything is silently discarded. I've setup a seperate access to our trac install using the CGI setup, this one can successfully edit a milestone.

Attachments (0)

Change History (6)

comment:1 by aashley@…, 20 years ago

Component: generalmod_python frontend
Owner: changed from Jonas Borgström to Christopher Lenz

Couldnt find it when searching before posting but it looks like this is a duplicate of #1142

comment:2 by aashley@…, 20 years ago

Bit more information on my setup:

This is on Fedora Core 3 with latest updates and the trac RPMs from the DAG repository. No custom built stuff at all.

comment:3 by Christopher Lenz, 20 years ago

Probably related to #1101.

comment:4 by aashley@…, 20 years ago

Okay I've looked into it more and I think I've figured out the problem.

When running under mod_python with it setup to be the root of a virtual host var:cgi_location in the cs templates evaluates to an empty string. which means the action field for the form ends up as action="".

Now different browsers handle this differently. Specifically mozilla firefox attempts to post it to the current page's url.

192.168.1.252 - - [09/Feb/2005:11:53:08 +0800] "POST /milestone/3.0.10?action=edit HTTP/1.1" 200 9660 "http://trac/milestone/3.0.10?action=edit" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050117 Firefox/1.0"

However you're processing forms/urls it seems the url takes precedence and so the form submitted info is lost.

Comparing how the form works running as a cgi script I manually edited the milestone.cs to set the action field to / (action="/"). This gets the same behaviour of the cgi script, posting the form elements to the base script.

192.168.1.252 - - [09/Feb/2005:11:55:15 +0800] "POST / HTTP/1.1" 302 14 "http://trac/milestone/3.0.10?action=edit" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050117 Firefox/1.0"

This caused firefox to post to / which got the changes to take.

Basically the fix for this problem is to make sure var:cgi_location is set to the base url for the script and not left blank. Unfortunatly I'm not very knowledgable with python code or I'd fix this myself.

Also to not this problem didnt occur with the text mode browser links, but them it does its handling of form submission and redirection unlike most other browsers.

comment:5 by Christopher Lenz, 20 years ago

Status: newassigned

Checking whether this is still a problem after my recent refactorings…

comment:6 by Christopher Lenz, 20 years ago

Milestone: 0.8.1
Resolution: fixed
Status: assignedclosed

Yep, this has been fixed in [1256], and ported to stable in [1258]. Fix will be in the 0.8.1 release.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christopher Lenz.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christopher Lenz 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.