[MGNLSTK-1045] FreeMarker templating error in Demo-Project/About/Articles/Standard-Article Created: 06/Dec/12  Updated: 11/Feb/13  Resolved: 06/Dec/12

Status: Closed
Project: Magnolia Standard Templating Kit (closed)
Component/s: None
Affects Version/s: 2.5
Fix Version/s: 2.5

Type: Bug Priority: Neutral
Reporter: Daniel Lipp Assignee: Espen Jervidalo
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
causality
is causing MGNLDAM-54 Fix Exceptions when rendering demo-pr... Closed
relation
is related to MGNLSTK-1047 DownloadTeaserModel still using dms D... Closed
Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

Related to changes subnode structure "jcr:content" - no longer "document"?

Exception:
The problematic instruction:
----------
==> ${(document.fileSize / 1024)?string("0")} [on line 42, column 102 in templating-kit/components/teasers/downloadFile.ftl]
----------

Java backtrace for programmers:
----------
freemarker.template.TemplateModelException: get(fileSize) failed on instance of info.magnolia.module.dms.beans.Document
at freemarker.ext.beans.BeanModel.get(BeanModel.java:224)
at freemarker.core.Dot._getAsTemplateModel(Dot.java:76)
...
Caused by: java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Long.parseLong(Long.java:431)
at java.lang.Long.valueOf(Long.java:525)
at info.magnolia.module.dms.beans.Document.getFileSize(Document.java:181)
... 194 more



 Comments   
Comment by Espen Jervidalo [ 06/Dec/12 ]

Reverted the workspace to dms. This fixes the excpetion but not the problem. See linked issue for more information.

Generated at Mon Feb 12 07:32:51 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.