[MGNLDEMO-389] Demo: TextImage component does not render/error if Asset-Link is broken Created: 25/Oct/21 Updated: 25/Oct/21 |
|
| Status: | Open |
| Project: | Magnolia Demo Projects |
| Component/s: | None |
| Affects Version/s: | 1.6.3 |
| Fix Version/s: | None |
| Type: | Task | Priority: | Neutral |
| Reporter: | Christian Ringele | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoR: |
Empty
|
| Description |
Reproduce
ProblemThe textImage component renders a null-pointer error if the is an non-rsolvable asset link. SolutionUse this code: [#if content.image?has_content] [#assign rendition = damfn.getRendition(content.image, "original")!] [#if rendition?has_content] [#assign hasImage = true] [#assign divClass = "${divClass} text-image-section"] [#assign imageClass = "content-image-${imagePosition}"] [#include "/travel-demo/templates/macros/imageResponsive.ftl"] [#assign imageHtml][@imageResponsive rendition content imageClass false def.parameters /][/#assign] [/#if] [/#if] I have attached the whole script file to replace. |