[MGNLDEMO-159] Links created with RichTextField within Tours content app are not resolved Created: 30/Mar/16 Updated: 03/Jun/16 Resolved: 25/Apr/16 |
|
| Status: | Closed |
| Project: | Magnolia Demo Projects |
| Component/s: | tours-app |
| Affects Version/s: | None |
| Fix Version/s: | 0.12 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Mercedes Iruela | Assignee: | Federico Grilli |
| Resolution: | Fixed | Votes: | 2 |
| Labels: | support | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 1.5d | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| 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)
|
||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||
| Release notes required: |
Yes
|
||||
| Sprint: | Basel 41 | ||||
| Story Points: | 3 | ||||
| Description |
|
If a 'Links to documents in the DAM' is included in a RichText Field in a content app, when this content is displayed as part of the page, the link is not rendered properly, the structure is like:
${link:{uuid:{795449d2-6c16-402e-9e8a-bbb101fe22bb},repository:{dam},path:{/tours/shark_brian_warrick_0824.JPG}}}
Same case, but rich text field in a component dialog is displayed properly. Possible workaround: use method LinkUtil.convertLinksFromUUIDPattern() This issue can be reproduced in travel-demo:
Outcome An alternative could be providing a templating function like resolveLinks(String) which could be used ad hoc directly in a template script. In our case at https://git.magnolia-cms.com/projects/MODULES/repos/demo-projects/browse/community/magnolia-travel-tours/src/main/resources/tours/templates/components/tourDetail.ftl#118 e.g.
<div class="body">${somefn.resolveLinks(tour.body)!}</div>
|