trac-code-comments-plugin
trac-code-comments-plugin copied to clipboard
Link in comment notification is wrong
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).
Unable to reproduce the duplicate path. Do you have multiple repositories configured?
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/.
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.