[MGNLDAM-697] #damfn.getRendition throws NPE when using a theme without imaging Created: 10/Mar/17  Updated: 23/Aug/22

Status: Open
Project: Magnolia DAM Module
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Christoph Meier Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
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)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Team: AuthorX

 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).


Generated at Mon Feb 12 05:02:22 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.