Opened 17 years ago
Closed 8 years ago
#1880 closed defect (wontfix)
[PATCH] URLs for projects in the project index are incorrect
Reported by: | 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
Summary: | URLs for projects in the project index are incorrect → [PATCH] URLs for projects in the project index are incorrect |
---|
comment:2 Changed 10 years ago by
Owner: | Noah Kantrowitz deleted |
---|
comment:3 Changed 8 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Plugin is deprecated.