Modify

Opened 15 years ago

Closed 11 years ago

#5533 closed defect (fixed)

BackLinks are not correct if you are using multiple trac projects

Reported by: anonymous Owned by: Ryan J Ollos
Priority: normal Component: BackLinksMacro
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

Not sure how to describe this, but my /trac URL isn't fixed at a single trac environment. Instead, it points to a directory containing multiple environments.

When the backlink macro generates the link, it generates something like:

a href="http://www.example.com/trac/wiki/Blah"

In a multi-environment setup, I need:

a href="http://www.example.com/trac/myproject/wiki/Blah"

So, I edited the macro replacing line:

buf.write('[li][a href="%s"]' % self.env.href.wiki(row[0]))

with:

buf.write('[li][a href="%s"]' % formatter.req.href.wiki(row[0]))

It seems to work for me. Just FYI if anyone else has this problem.

Please excuse the [] instead of <>. I cannot seem get the site to accept the angle brackets for html.

Attachments (0)

Change History (5)

comment:1 Changed 14 years ago by Trap

Status: newassigned

comment:2 Changed 14 years ago by Trap

I'll give it an eye.

comment:3 Changed 11 years ago by anonymous

Hello, Have you got it an eye already? I have the same problem, the url is missing the name of the project.

comment:4 Changed 11 years ago by Ryan J Ollos

Owner: changed from Trap to Ryan J Ollos
Status: assignednew

comment:5 Changed 11 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

In 13390:

Generated href links were not correct in an environment with multiple projects. Fixes #5533.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
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.