An error occurred while processing the template.
The following has evaluated to null or missing:
==> document.getString  [in template "383767#383802#1221395" at line 37, column 36]

----
Tip: It's the step after the last dot that caused this error, not those before it.
----
Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----

----
FTL stack trace ("~" means nesting-related):
	- Failed at: ${"/documents/" + document.getString(...  [in template "383767#383802#1221395" at line 37, column 18]
----
1<#assign 
2    JALS = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") 
3    articleId = "1221309" 
4     
5    article = JALS.fetchArticle(groupId, articleId) 
6     
7    document = saxReaderUtil.read(article.getContent()) 
8    rootElement = document.getRootElement() 
9/> 
10 
11<div class="container py-5 mt-5"> 
12    <#assign stringSelector = "dynamic-element[@name='allegato']"> 
13    <#assign xPathSelector = saxReaderUtil.createXPath(stringSelector)> 
14    <#if xPathSelector.selectNodes(rootElement)??> 
15        <#assign allegati = xPathSelector.selectNodes(rootElement)> 
16    </#if> 
17     
18    <#list allegati as allegato> 
19        <#assign stringSelector = "dynamic-element[@name='testo']/dynamic-content[@language-id = '" + themeDisplay.getLocale() + "']"> 
20        <#assign xPathSelector = saxReaderUtil.createXPath(stringSelector)> 
21        <#if xPathSelector.selectSingleNode(allegato)??> 
22            <#assign text = xPathSelector.selectSingleNode(allegato).getData()> 
23        </#if> 
24         
25        <#assign stringSelector = "dynamic-element[@name='mandatory']/dynamic-content[@language-id = '" + themeDisplay.getLocale() + "']"> 
26        <#assign xPathSelector = saxReaderUtil.createXPath(stringSelector)> 
27        <#if xPathSelector.selectSingleNode(allegato)??> 
28            <#assign mandatory = xPathSelector.selectSingleNode(allegato).getData()> 
29        </#if> 
30         
31        <#assign stringSelector = "dynamic-element[@name='documento']/dynamic-content[@language-id = '" + themeDisplay.getLocale() + "']"> 
32        <#assign xPathSelector = saxReaderUtil.createXPath(stringSelector)> 
33        <#if xPathSelector.selectSingleNode(allegato)??> 
34            <#assign document = jsonFactoryUtil.createJSONObject(xPathSelector.selectSingleNode(allegato).getData())> 
35        </#if> 
36     
37        <a href="${'/documents/' + document.getString('groupId') + '/0/' + document.getString('title') + '/' + document.getString('uuid')}" class="d-block" download> 
38            ${mandatory} - ${text} 
39        </a> 
40    </#list> 
41</div>