Si è verificato un errore nell'elaborarazione del modello.
The following has evaluated to null or missing:
==> cur_attachmentDataJson.extension  [in template "20098#20124#40520" at line 159, column 98]

----
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 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: ${cur_attachmentDataJson.title?keep_b...  [in template "20098#20124#40520" at line 159, column 49]
----
1<#-- instanceId --> 
2<#assign instanceId = themeDisplay.getPortletDisplay().getId()?keep_after("INSTANCE_") /> 
3 
4<#-- labels --> 
5<#assign label_attachments = languageUtil.get(locale, "label_attachments") /> 
6<#assign label_see_image = languageUtil.get(locale, "label_see_image") /> 
7<#assign label_go_to_the_page = languageUtil.get(locale, "label_go_to_the_page") /> 
8<#assign label_download_attachment = languageUtil.get(locale, "label_download_attachment") /> 
9 
10  
11<#-- Service for taking Journal Article Data --> 
12<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") /> 
13<#-- Service for taking object layout --> 
14<#assign layoutLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService") /> 
15<#-- Service for taking category --> 
16<#assign catLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") /> 
17 
18<#assign dlFileEntryService = serviceLocator.findService('com.liferay.document.library.kernel.service.DLFileEntryLocalService') /> 
19<#assign dlAppService = serviceLocator.findService('com.liferay.document.library.kernel.service.DLAppService') /> 
20  
21<#-- Function for escaping extra character  --> 
22<#function escapeExtraChar text> 
23    <#return text?replace("\"","&quot;", "r")?replace("'","&rsquo;", "r")> 
24</#function> 
25  
26<#-- Check if list have at least on element --> 
27<#function atLeastOneElement list> 
28     <#assign isNotEmpty = false /> 
29     <#if list?? && list?has_content && list.getSiblings()?has_content> 
30        <#list list.getSiblings() as cur_elem> 
31            <#if validator.isNotNull(cur_elem) && validator.isNotNull(cur_elem.getData()) && cur_elem.getData() != "{}"> 
32                <#assign isNotEmpty = true /> 
33                <#break> 
34            </#if> 
35        </#list> 
36    </#if> 
37    <#return isNotEmpty> 
38</#function> 
39<#function atLeastOneElementAtAttachmentFieldGroup list> 
40     <#assign isNotEmpty = false /> 
41     <#if list?? && list?has_content && list.getSiblings()?has_content> 
42        <#list list.getSiblings() as cur_elem> 
43            <#if validator.isNotNull(cur_elem.attachment_file) && validator.isNotNull(cur_elem.attachment_file.getData()) && cur_elem.attachment_file.getData() != "{}"> 
44                <#assign isNotEmpty = true /> 
45                <#break> 
46            </#if> 
47        </#list> 
48    </#if> 
49    <#return isNotEmpty> 
50</#function> 
51  
52<#-- Taking the label of radio button--> 
53<#function getOptionLabel ddmStructure fieldSelectName optionValue> 
54    <#assign optionLabel = "" /> 
55    <#if ddmStructure.getDDMFormField(fieldSelectName).getDDMFormFieldOptions().getOptionLabels(optionValue)??> 
56        <#assign optionLabel = ddmStructure.getDDMFormField(fieldSelectName).getDDMFormFieldOptions().getOptionLabels(optionValue).getString(locale) /> 
57    </#if> 
58    <#return optionLabel /> 
59</#function> 
60<#-- Taking the label of checkbox --> 
61<#function getCheckboxLabel ddmStructure fieldCheckboxName> 
62    <#return ddmStructure.getDDMFormField(fieldCheckboxName).getLabel().getString(locale)/> 
63</#function> 
64<#-- Taking the label of field --> 
65<#function getFieldLabel ddmStructure fieldName> 
66    <#return ddmStructure.getDDMFormField(fieldName).getLabel().getString(locale)/> 
67</#function> 
68  
69<#-- Taking metadata's on all article --> 
70<#-- Taking article id --> 
71<#assign articleId = .vars['reserved-article-id'].data /> 
72<#-- Taking the title --> 
73<#assign titolo = .vars['reserved-article-title'].data /> 
74  
75<#-- Other data associated with the item that I obtain via API --> 
76<#assign article = journalArticleLocalService.getArticle( groupId,  articleId ) /> 
77  
78<#-- Article last modification date --> 
79<#assign articleModifiedDateObj = article.getModifiedDate() /> 
80<#-- Format last modification date --> 
81<#if validator.isNotNull(articleModifiedDateObj)> 
82    <#assign articleModifiedDate = dateUtil.getDate(articleModifiedDateObj, "dd/MM/yyyy, hh:mm", locale) /> 
83</#if> 
84<#-- Url Title journal article --> 
85<#assign articleUrlTitle = article.getUrlTitle() /> 
86<#-- Primary key journal article --> 
87<#assign articlePrimKey = article.resourcePrimKey/> 
88<#-- Structure journal article --> 
89<#assign articleStructure = article.getDDMStructure() /> 
90  
91<#-- Functions to obtain a list of categories --> 
92<#-- If the indicated character is the category prefix, it indicates that the category must not be shown on the screen, but is only used for functional purposes --> 
93<#assign PREFIX_SERVICE_CATEGORY = "_" /> 
94<#-- I get all the categories associated with an article except those that have a prefix "_" --> 
95<#function getCategoryByArticlePrimKey articlePrimKey> 
96    <#assign tmp = "" />  
97    <#assign articleCatNames = catLocalService.getCategories("com.liferay.journal.model.JournalArticle", getterUtil.getLong(articlePrimKey)) /> 
98    <#if (articleCatNames?size > 0)> 
99        <#list articleCatNames as category>   
100            <#if category.name?substring(0,1) != PREFIX_SERVICE_CATEGORY > 
101                <#assign tmp = tmp + category.name + ", " />  
102            </#if> 
103        </#list> 
104        <#assign tmp = tmp?keep_before_last(",") />               
105    </#if> 
106    <#return tmp> 
107</#function> 
108<#-- Variant: Returns only the list of category objects --> 
109<#function getListCategoryByArticlePrimKey articlePrimKey> 
110    <#assign listCategories = [] />   
111    <#assign articleCat = catLocalService.getCategories("com.liferay.journal.model.JournalArticle", getterUtil.getLong(articlePrimKey)) /> 
112    <#if (articleCat?size > 0)> 
113        <#list articleCat as category>    
114            <#if category.name?substring(0,1) != PREFIX_SERVICE_CATEGORY > 
115                <#assign listCategories = listCategories + [category] />  
116            </#if> 
117        </#list> 
118    </#if> 
119    <#return listCategories> 
120</#function> 
121  
122<#-- html --> 
123<section class="project-and-document-detail" vocab="https://schema.org/" typeof="WebAPI"> 
124    <div class="container mb-5"> 
125        <div class="col-12"> 
126            <div class="row"> 
127                <#if (title.getData())??> 
128                    <h1 property="name" class="mb-4 mt-3">${title.getData()}</h1> 
129                </#if> 
130            </div> 
131            <div class="row d-block"> 
132                <#if (image.getData())?? && image.getData() != ""> 
133                    <div class="article-image"> 
134                        <a href="${image.getData()}" data-toggle="lightbox" data-type="image" title="${label_see_image}" aria-label="${label_see_image}"> 
135                            <img alt="${image.getAttribute("alt")}" data-fileentryid="${image.getAttribute("fileEntryId")}" src="${image.getData()}" class="object-fit-cover w-100 h-100"> 
136                        </a> 
137                        <p>${image.getAttribute("alt")}</p> 
138                    </div> 
139                </#if> 
140                <#if (description.getData())??> 
141                    <div class="text-justify" property="description">${description.getData()}<div> 
142                </#if> 
143            </div> 
144            <#if atLeastOneElementAtAttachmentFieldGroup(attachment)> 
145                <div class="row"> 
146                    <div class="col-12"> 
147                        <h3 class="font-weight-bold mb-4 mt-3">${label_attachments}</h3> 
148                    </div> 
149                    <div class="col-12 ml-5"> 
150                        <#list attachment.getSiblings() as cur_attachment> 
151                            <div class="row mb-3"> 
152                                <#if validator.isNotNull(cur_attachment.attachment_file) && validator.isNotNull(cur_attachment.attachment_file.getData())> 
153                                    <a property="documentation" href="${cur_attachment.attachment_file.getData()}" class="text-body d-flex" title="${label_download_attachment}" aria-label="${label_download_attachment}"> 
154                                        <i class="icon-file-alt text-body mr-2 text-decoration-none pt-1"></i> 
155                                        <div> 
156                                            <p class="font-weight-semi-bold mb-1"> 
157                                                <#assign cur_attachmentJson = jsonFactoryUtil.createJSONObject(cur_attachment.attachment_file) /> 
158                                                <#assign cur_attachmentDataJson = jsonFactoryUtil.createJSONObject(cur_attachmentJson.data) /> 
159                                                ${cur_attachmentDataJson.title?keep_before("." + cur_attachmentDataJson.extension?string)} 
160                                            </p> 
161                                            <#if validator.isNotNull(cur_attachment.attachment_description) && validator.isNotNull(cur_attachment.attachment_description.getData())> 
162                                            <span>${cur_attachment.attachment_description.getData()}</span> 
163                                            </#if> 
164                                        </div> 
165                                    </a> 
166                                </#if> 
167                            </div> 
168                        </#list> 
169                    </div> 
170                </div> 
171            </#if> 
172            <#if atLeastOneElement(linkToInternalPage) || atLeastOneElement(linkToExternalPage)> 
173                <div class="row"> 
174                    <div class="col-12"> 
175                        <h3 class="font-weight-bold mb-4 mt-3">Link</h3> 
176                    </div> 
177                    <div class="col-12 ml-5"> 
178                        <#if atLeastOneElement(linkToInternalPage) > 
179                            <#list linkToInternalPage.getSiblings() as cur_linkToInternalPage> 
180                                <#if validator.isNotNull(cur_linkToInternalPage) && validator.isNotNull(cur_linkToInternalPage.getData()) && cur_linkToInternalPage.getData() != "{}"> 
181                                    <div class="row mb-3"> 
182                                        <#assign cur_linkToInternalPageJson = jsonFactoryUtil.createJSONObject(cur_linkToInternalPage) /> 
183                                        <#assign cur_linkToInternalPageDataJson = jsonFactoryUtil.createJSONObject(cur_linkToInternalPageJson.data) /> 
184                                        <a data-senna-off="true" href="${cur_linkToInternalPage.getFriendlyUrl()}" class="text-body" title="${label_go_to_the_page}" aria-label="${label_go_to_the_page}"> 
185                                            <p><i class="icon-link text-body mr-1 text-decoration-none"></i> 
186                                            ${cur_linkToInternalPageDataJson.title} 
187                                            </p> 
188                                        </a> 
189                                    </div> 
190                                </#if> 
191                            </#list> 
192                        </#if> 
193                        <#if atLeastOneElement(linkToExternalPage)> 
194                            <#list linkToExternalPage.getSiblings() as cur_linkToExternalPage> 
195                                <#if (cur_linkToExternalPage.getData())??> 
196                                    <div class="row mb-3 text-body"> 
197                                        <i class="icon-link text-body mr-2 text-decoration-none"></i> 
198                                        ${cur_linkToExternalPage.getData()} 
199                                    </div> 
200                                </#if> 
201                            </#list> 
202                        </#if> 
203                    </div> 
204                </div> 
205            </#if> 
206        </div> 
207    </div> 
208</section> 
209 
210<script type="text/javascript"> 
211    $(document).off("click", '[data-toggle="lightbox"]').on("click", '[data-toggle="lightbox"]', function(event) { 
212        event.preventDefault(); 
213        $(this).ekkoLightbox(); 
214    }); 
215</script>