[MAGNOLIA-2626] Extend AbsoluteLinkTransformer to allow generating links with arbitrary context path Created: 17/Feb/09 Updated: 19/Dec/16 Resolved: 04/Nov/15 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | 4.0 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major |
| Reporter: | Jan Haderka | Assignee: | Unassigned |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | maintenance, quickwin | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Date of First Response: |
| Description |
|
To generate mail with link back to content one need to create absolute link, but since I'm executing template from within mail command there is no web context defined so AbsoluteLinkTransformer fails. We need a way to allow setting of the context path for the transformer directly and use WebContext to retrieve it only when not set. |
| Comments |
| Comment by Magnolia International [ 17/Feb/09 ] |
|
You don't only need a "contextPath". You need the ServerConfiguration.getDefaultBaseUrl(). <p>Please follow this link in order to validate your account: <a href="${defaultBaseUrl}${pagePath}">${defaultBaseUrl}${pagePath}</a></p>
|
| Comment by Jan Haderka [ 17/Feb/09 ] |
|
Yes, that's how i'm solving the issue for now - since i have only UUID of the content to construct link i'm using LinkUtil to get relative link to "/" and then prefix that with defaultBaseUrl. Point is AbsoluteLinkTransformer should be able to do that for you. |
| Comment by Jan Haderka [ 04/Dec/13 ] |
|
defaultBaseUrl is not correct in multi-site configuration. |
| Comment by Michael Mühlebach [ 04/Nov/15 ] |
|
Given the thousands of other issues we have open that are more highly requested, we won't be able to address this issue in the foreseeable future. Instead we will focus on issues with a higher impact, and more votes. |