trac-code-comments-plugin icon indicating copy to clipboard operation
trac-code-comments-plugin copied to clipboard

Link in comment notification is wrong

Open PhilippWendler opened this issue 11 years ago • 3 comments

My Trac instance is hosted at http://server/trac/project and I have specified this value as base_url in trac.ini. When creating a comment (for a line of a file), the notification email contains the link http://server/trac/project/trac/project/browser/trunk/... (duplicate path prefix).

PhilippWendler avatar Sep 24 '14 09:09 PhilippWendler

Unable to reproduce the duplicate path. Do you have multiple repositories configured?

schwuk avatar Oct 05 '14 14:10 schwuk

Yes, I have multiple repositories, but that part seems to be correct (so far I only tested the one repository that is the default repository in our project). The full URL in the mail was https://svn.sosy-lab.org/trac/cpachecker/trac/cpachecker/browser/trunk/src/org/sosy_lab/cpachecker/cpa/predicate/synthesis/RelSynthTest.java?codecomment=3&rev=13706#L62. base_url is set to https://svn.sosy-lab.org/trac/cpachecker.

The correct URL to the repository in the trac browser is https://svn.sosy-lab.org/trac/cpachecker/browser/CPAchecker/ or simply https://svn.sosy-lab.org/trac/cpachecker/browser/.

PhilippWendler avatar Oct 06 '14 11:10 PhilippWendler

Managed to replicate this by running Trac with both base_url specified and under a different base path.

This is down to how we generate the href for a code comment and/or how we generate the URL for the notification. I need to fix one (or both) to allow for running under a base path.

schwuk avatar Oct 06 '14 22:10 schwuk