Modify

Opened 4 years ago

Closed 20 months ago

#7597 closed defect (duplicate)

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

Reported by: PeterLawrence Owned by: rjollos
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 4 years ago by rjollos

  • Summary changed from "Environment not found" when clicking on the vote icon of an issue with comments to [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 20 months ago by rjollos

  • Resolution set to duplicate
  • Status changed from new to closed

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from rjollos. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.