﻿id,summary,reporter,owner,description,type,status,priority,component,severity,resolution,keywords,cc,release
7597,"[Patch] ""Environment not found"" when clicking on the vote icon of an issue with comments",PeterLawrence,rjollos,"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 [FiveStarVotePlugin 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 [FiveStarVotePlugin 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.

",defect,closed,normal,VotePlugin,normal,duplicate,,,0.12
