Opened 9 years ago

Closed 5 months 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


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 9 years ago by anonymous

  • Summary changed from URLs for projects in the project index are incorrect to [PATCH] URLs for projects in the project index are incorrect

comment:2 Changed 21 months ago by rjollos

  • Owner coderanger deleted

comment:3 Changed 5 months ago by rjollos

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

Plugin is deprecated.

Add Comment

Modify Ticket

as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.