Modify

Opened 17 years ago

Closed 8 years ago

#1880 closed defect (wontfix)

[PATCH] URLs for projects in the project index are incorrect

Reported by: mpalmer@… Owned by:
Priority: normal Component: TracForgePlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

At present, the links for other projects in the Project Index look like this:

<a href="/thisproject/projects/other_project" title="Other Project Desc">Other Project Name</a>

Which, when clicked on, produces a "No handler matched request" error and a really ugly page.

this patch "solves" the problem (for me) by using env.project_path when it's set instead of the href.projects hoo-hah. The patch will not solve the problem for anyone who doesn't set url in the [project] section of their config file, but I'm not sure how many people don't set the project URL (I certainly don't trust Trac to get it right all the time). Auto-calculating the URL is always going to be tricky anyway, for people who have non-standard URL to project mappings, so the patch uses the explicitly-set value when available, and only auto-calcuates when it needs to. This way, when req.href.projects gets fixed, it'll work for everyone regardless of their URL layout!

There is some fragility in the check of env.project_url for a "default value" -- I'm explicitly checking against a hard-coded string which is the current default. If there's a way to check an environment attribute for "this is unset, using the default" that should be used, but I'm not knowledgeable about the Trac API.

Attachments (0)

Change History (3)

comment:1 Changed 17 years ago by anonymous

Summary: URLs for projects in the project index are incorrect[PATCH] URLs for projects in the project index are incorrect

comment:2 Changed 9 years ago by Ryan J Ollos

Owner: Noah Kantrowitz deleted

comment:3 Changed 8 years ago by Ryan J Ollos

Resolution: wontfix
Status: newclosed

Plugin is deprecated.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
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.