-
Improvement
-
Resolution: Done
-
Minor
-
None
Rendering error that is sometimes observed in log files damfn-error.txt.
12:36:03,551 INFO [stdout] (default task-3) WARN info.magnolia.dam.templating.functions.DamTemplatingFunctions 11.02.2021 12:36:03 -- The following ItemKey 'null' generated exceptions when trying to retrieve the associated Item : ItemKey is null or blank. 12:36:03,551 INFO [stdout] (default task-3) java.lang.IllegalArgumentException: ItemKey is null or blank. 12:36:03,551 INFO [stdout] (default task-3) at info.magnolia.dam.templating.functions.DamTemplatingFunctions.validateItemKey(DamTemplatingFunctions.java:498) ~[magnolia-dam-templating-3.0.3.jar:?] 12:36:03,551 INFO [stdout] (default task-3) at info.magnolia.dam.templating.functions.DamTemplatingFunctions.getItem(DamTemplatingFunctions.java:458) ~[magnolia-dam-templating-3.0.3.jar:?] 12:36:03,551 INFO [stdout] (default task-3) at info.magnolia.dam.templating.functions.DamTemplatingFunctions.getAsset(DamTemplatingFunctions.java:115) ~[magnolia-dam-templating-3.0.3.jar:?] 12:36:03,551 INFO [stdout] (default task-3) at info.magnolia.dam.templating.functions.DamTemplatingFunctions.getAssetMapForAssetId(DamTemplatingFunctions.java:310) ~[magnolia-dam-templating-3.0.3.jar:?]
It would be helpful to do some rendering level logging for the template and content being rendered. The downside is the additional log file size.
Workaround
Search all template scripts for usages of "damfn.getAsset(" and change the script logic to check for the missing ItemKey before calling damfn.
See also Freemarker attempt-recover: https://freemarker.apache.org/docs/ref_directive_attempt.html
Acceptance criteria
- is related to
-
MGNLDAM-722 Crashes - flattenTransparentImageForOpaqueFormat cannot run on image with ComponentColorModel
- Closed