Defect #3483
closedRelative url for source links in notifications
80%
Description
The email of an issue that includes a "source:" link is included in the email as a relative link ala:
<a href="/repositories/entry/..." class="source">source:...</a>
The link needs to be made absolute.
Not sure if this applies to other links besides source: links..
Ruby version 1.8.6 (i386-mswin32)
RubyGems version 1.3.1
Rails version 2.1.2
Files
Related issues
Updated by William Baum about 15 years ago
- File source_export-only_path.patch source_export-only_path.patch added
- % Done changed from 0 to 80
This issue should be resolved with the attached patch.
The link_to
for source: and export: links wasn't setting :only_path => only_path
, so the links weren't being converted to absolute links in emails, etc..
Index: app/helpers/application_helper.rb =================================================================== --- app/helpers/application_helper.rb (revision 2879) +++ app/helpers/application_helper.rb (working copy) @@ -527,7 +527,7 @@ if project && project.repository name =~ %r{^[/\\]*(.*?)(@([0-9a-f]+))?(#(L\d+))?$} path, rev, anchor = $1, $3, $5 - link = link_to h("#{prefix}:#{name}"), {:controller => 'repositories', :action => 'entry', :id => project, + link = link_to h("#{prefix}:#{name}"), {:only_path => only_path, :controller => 'repositories', :action => 'entry', :id => project, :path => to_path_param(path), :rev => rev, :anchor => anchor,
Please also see Feature #4052 for additional enhancements to source and export links, as well as enhancements to commit, and revision links from #3346.
--Bill
Updated by Daniel Felix almost 12 years ago
I tested it with this comment. I was able to reproduce it. I get a mail with some invalid link. This should be corrected.
Updated by Daniel Felix almost 12 years ago
- Status changed from New to Confirmed
- Priority changed from Low to Normal
- Affected version (unused) changed from 0.8.4 to 2.2.1
- Affected version changed from 0.8.4 to 2.2.1
Updated by Etienne Massip almost 12 years ago
- Target version set to Candidate for next minor release
Updated by Toshi MARUYAMA over 10 years ago
- Related to Feature #4052: Cross-project redmine links with alternate link text for source and export links. added
Updated by Jean-Philippe Lang over 10 years ago
- Status changed from Confirmed to Resolved
- Assignee set to Jean-Philippe Lang
- Target version changed from Candidate for next minor release to 2.5.2
- Resolution set to Fixed
Patch applied in r13219, thanks.
Updated by Jean-Philippe Lang over 10 years ago
- Subject changed from Relative rather than absolute href links in issue emails... to Relative url for source links in notifications