Details
-
Bug
-
Resolution: Unresolved
-
Neutral
-
None
-
None
-
None
-
None
Description
When using a theme, and if the theme does not configure imaging, damfn.getRendition throws an NPE.
This happens e,g, when using the components image or textImage from mtk.
ftl error comes from this line:
[#assign rendition = damfn.getRendition(content.image, "original")]
Incomplete theme e.g. looks like this:
cssFiles:
bootstrap:
link: /.resources/multisite-examples-lightmodule/webresources/css/bootstrap.css
media: all
The problem gets "fixed" when assigning the imaging/class
cssFiles:
bootstrap:
link: /.resources/multisite-examples-lightmodule/webresources/css/bootstrap.css
media: all
imaging:
class: info.magnolia.templating.imaging.VariationAwareImagingSupport
I'm not 100% sure whether the bug is really to be fixed on the dam templating functions.
#damfn.getRendition should be tolerant enough to just use the original asset (which actually works fine if you are not using a theme).
Checklists
Acceptance criteria