Modify

Opened 5 years ago

Closed 15 months ago

#5533 closed defect (fixed)

BackLinks are not correct if you are using multiple trac projects

Reported by: anonymous Owned by: rjollos
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 5 years ago by trapanator

  • Status changed from new to assigned

comment:2 Changed 5 years ago by trapanator

I'll give it an eye.

comment:3 Changed 16 months 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 15 months ago by rjollos

  • Owner changed from trapanator to rjollos
  • Status changed from assigned to new

comment:5 Changed 15 months ago by rjollos

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

In 13390:

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

Add Comment

Modify Ticket

Action
as closed The owner will remain rjollos.
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.