Modify

Opened 14 years ago

Closed 12 years ago

#7597 closed defect (duplicate)

[Patch] "Environment not found" when clicking on the vote icon of an issue with comments

Reported by: Peter Owned by: Ryan J Ollos
Priority: normal Component: VotePlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description

Hi, I'm getting the error message "Environment not found" when clicking on the voting icon of an issue when it has had comments appended. However, if it was a new issue which had no comments it worked fine.

On further examination the plug-in seems to be redirecting me to a page which had the URL address, for example, "/ticket/9" where the ticket's actual address was "/project1/ticket/9".

Note I've my base URL set in the trac.ini file as

base_url = http://xxxxxx:8080/project1/

To fix the problem, for my installation, I examined the code from the Five Star Vote plugin and saw that there was a difference regarding the returning URL on the last line of the function def process_request(self, req):

This plug-in uses req.redirect(resource) where as the Five Star Vote plugin plug-in uses req.redirect(req.get_header('Referer'))

After making this small change to the last line of the function process_request everything seems to be working as expected.

Attachments (0)

Change History (2)

comment:1 Changed 14 years ago by Ryan J Ollos

Summary: "Environment not found" when clicking on the vote icon of an issue with comments[Patch] "Environment not found" when clicking on the vote icon of an issue with comments

Thanks for the report and fix. I will take a look now and likely incorporate into the codebase.

comment:2 Changed 12 years ago by Ryan J Ollos

Resolution: duplicate
Status: newclosed

Duplicate of #8597.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.