Si è verificato un errore nell'elaborarazione del modello.
Java method "static com.liferay.document.library.kernel.service.DLFolderLocalServiceUtil.getFolder(long, long, String)" threw an exception; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign imageFolderId = DLFolderLocal...  [in template "10154#10192#12216572" at line 233, column 37]
----
1<#setting locale="it_IT"> 
2 
3<#assign AssetEntryLocalServiceUtil = staticUtil["com.liferay.asset.kernel.service.AssetEntryLocalServiceUtil"] /> 
4<#assign assetLinkLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService") /> 
5 
6<#assign JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")> 
7<#assign journalArticleId = .vars['reserved-article-id'].data/> 
8 
9<#assign article = JournalArticleLocalService.getArticle(groupId, journalArticleId) /> 
10<#assign entry = AssetEntryLocalServiceUtil.fetchEntry("com.liferay.journal.model.JournalArticle", article.resourcePrimKey) /> 
11 
12<#assign AssetCategoryLocalServiceUtil = staticUtil["com.liferay.asset.kernel.service.AssetCategoryLocalServiceUtil"]> 
13<#assign categoryList = AssetCategoryLocalServiceUtil.getAssetEntryAssetCategories(entry.entryId) /> 
14<#assign UserLocalServiceUtil = staticUtil["com.liferay.portal.kernel.service.UserLocalServiceUtil"]> 
15<#assign DLFileEntryLocalServiceUtil =  serviceLocator.findService('com.liferay.document.library.kernel.service.DLFileEntryLocalService') />  
16<#assign GroupLocalServiceUtil = staticUtil["com.liferay.portal.kernel.service.GroupLocalServiceUtil"]> 
17<#assign DLFolderLocalServiceUtil = staticUtil["com.liferay.document.library.kernel.service.DLFolderLocalServiceUtil"]> 
18<#assign DLAppLocalServiceUtil = staticUtil["com.liferay.document.library.kernel.service.DLAppLocalServiceUtil"]> 
19 
20<#assign currentArticle = JournalArticleLocalService.getArticle(groupId, .vars['reserved-article-id'].data) /> 
21<#assign currentArticleResourcePrimKey = currentArticle.getResourcePrimKey() /> 
22<#assign currentArticleAssetEntry = AssetEntryLocalServiceUtil.getEntry("com.liferay.journal.model.JournalArticle", currentArticleResourcePrimKey) /> 
23<#assign currentArticleAssetEntryId = currentArticleAssetEntry.getEntryId() /> 
24 
25<#assign siteBaseURL = themeDisplay.getPortalURL() + themeDisplay.getPathFriendlyURLPublic() + themeDisplay.getLayout().getGroup().getFriendlyURL() />  
26<#assign imagePath = themeDisplay.getTheme().getContextPath() + themeDisplay.getTheme().getImagesPath() /> 
27<#assign jsPath = themeDisplay.getTheme().getContextPath() + themeDisplay.getTheme().getJavaScriptPath() + "/" /> 
28 
29<#assign Autori = [] /> 
30<#assign temi = [] /> 
31<#assign Provincia = [] /> 
32 
33<#assign currentCategory = 0 /> 
34 
35<#list categoryList as category> 
36    <#assign AssetVocabularyServiceUtil = staticUtil["com.liferay.asset.kernel.service.AssetVocabularyServiceUtil"]> 
37    <#assign assetVocabulary = AssetVocabularyServiceUtil.getVocabulary(category.getVocabularyId()) /> 
38    <#if assetVocabulary.getName() == "Temi"> 
39	 
40		<#if category.getParentCategory()??> 
41			<#assign childCategory = category.getName()/> 
42		<#else> 
43			<#if (currentCategory?? && currentCategory != category.getCategoryId()) > 
44				<#assign currentCategory = category.getCategoryId() /> 
45				<#assign parentCategory = category.getName()/> 
46				<#assign temi = temi + [parentCategory] /> 
47			</#if> 
48		</#if> 
49		 
50    <#elseif assetVocabulary.getName() == "5. Autori"> 
51        <#assign Autori = Autori + [category.getName()] /> 
52	<#elseif assetVocabulary.getName() == "Provincia"> 
53        <#assign Provincia = Provincia + [category.getName()] /> 
54    </#if> 
55</#list> 
56 
57<#list categoryList as category> 
58    <#if category.getParentCategory()??> 
59        <#assign childCategory = category.getName()/> 
60    <#else> 
61        <#assign parentCategory = category.getName()/> 
62    </#if> 
63</#list> 
64 
65<link rel="stylesheet" href="${jsPath}lightbox2/dist/css/lightbox.min.css"> 
66<link rel="stylesheet" type="text/css" href="${jsPath}slick/slick.css"/> 
67<link rel="stylesheet" type="text/css" href="${jsPath}slick/slick-theme.css"/> 
68 
69<style> 
70.header-title{ 
71    display:none; 
72
73.header-back-to{ 
74    display:none; 
75
76 
77.hide-content{ 
78    visibility:hidden; 
79    height : 0; 
80    padding: 0px !important; 
81    overflow: hidden; 
82
83 
84.content_para{ 
85    float:none !important; 
86
87 
88.hide-content img{ 
89    display:none; 
90
91</style> 
92 
93<#assign classColumnLeft = "12" /> 
94	 
95<#assign currentArticleRelatedLinks = assetLinkLocalService.getDirectLinks(currentArticleAssetEntryId) /> 
96 
97<#if (currentArticleRelatedLinks?? && currentArticleRelatedLinks?has_content) > 
98	<#assign classColumnLeft = "8" /> 
99</#if> 
100 
101<section class="container rt-container" id="content"> 
102	<div class="row"> 
103		<!-- 1 --> 
104		<div class="col-md-12 portlet-column portlet-column-only" id="column-1"> 
105			<!-- Subheader news --> 
106			<section class="rt-subheader rt-subheader--news"> 
107				<div class="rt-subheader__top"> 
108					<div class="rt-subheader__category-wrapper"> 
109						<#list temi as category> 
110							<div class="rt-subheader__category"> 
111								${category} 
112							</div> 
113						</#list> 
114					</div>	 
115					 
116					<div class="rt-subheader__publication"> 
117						<#assign nomeAutore = "" /> 
118						<#if Autori?? && (Autori?size > 0)> 
119							<#if Autori[0]?? && Autori[0] != "" && Autori[0] != "redazione"> 
120								<#assign userAutore = UserLocalServiceUtil.getUserByScreenName(themeDisplay.getCompanyId(), Autori[0]) /> 
121								<#if userAutore??  && userAutore?has_content> 
122									<#assign nomeAutore =  userAutore.getFullName() /> 
123								</#if> 
124							<#else> 
125								<#assign nomeAutore = "Redazione" /> 
126							</#if> 
127						</#if> 
128						<#if nomeAutore?? && nomeAutore != ""> 
129							<div class="rt-subheader__author"> 
130								<a title="Vai alla pagina dell'autore ${nomeAutore?html}" aria-label="Vai alla pagina dell'autore ${nomeAutore?html}" href="/autori/${nomeAutore?html}"> 
131									di ${nomeAutore?html} 
132								</a> 
133							</div> 
134						</#if> 
135						<#list Provincia as location> 
136							<div class="rt-news-location"> 
137								<i aria-hidden="true" class="fas fa-map-marker-alt"></i> ${location} 
138							</div> 
139						</#list> 
140 
141						<#assign publishDate = .vars['reserved-article-display-date'].data /> 
142						<#assign publishDate = publishDate?datetime("EEE, d MMM yyyy HH:mm:ss Z")> 
143						<#assign dateFormatDayMonth = "dd MMMM"> 
144						<#assign dateFormatHours = "HH:mm"> 
145						<div class="rt-subheader__date">${publishDate?string(dateFormatDayMonth)?remove_beginning("0")}</div> 
146						<div class="rt-subheader__time">${publishDate?string(dateFormatHours)?remove_beginning("0")}</div> 
147					</div> 
148				</div> 
149 
150				<div class="rt-subheader__wrapper"> 
151					<div class="rt-subheader__title-wrapper"> 
152						<h1 class="rt-subheader__title"> 
153							${.vars['reserved-article-title'].data} 
154						</h1> 
155						<#assign subtitle = .vars['reserved-article-description'].data /> 
156						<#if subtitle?? && subtitle != ""> 
157							<div class="rt-subheader__subtitle"> 
158								${subtitle} 
159							</div> 
160						</#if> 
161					</div> 
162				</div> 
163 
164			</section> 
165		</div> 
166	</div> 
167	<div class="row has-sidebar"> 
168 
169        <div class="col-md-12 col-lg-${classColumnLeft} portlet-column portlet-column-first"> 
170             
171            <#if (Testo?? && Testo.getData() != "") || (testo?? && testo.getData() != "") >     
172                <div class="rt-page__content rt-page-content--left"> 
173                    <div class="rt-page__content-text"> 
174                        <#if Immagine?? && Immagine.getData()?? && Immagine.getData() != ""> 
175                            <figure> 
176                                <#if (Immagine.getAttribute("alt")?? || Immagine.getAttribute("fileEntryId")??)> 
177                                    <img alt="${Immagine.getAttribute("alt")}" 
178                                        data-fileentryid="${Immagine.getAttribute("fileEntryId")}" 
179                                        src="${Immagine.getData()}" /> 
180                                <#else> 
181                                    <img alt="${.vars['reserved-article-title'].data}" 
182                                        src="${Immagine.getData()}" /> 
183                                </#if> 
184                                <#if Descrizione?? && Descrizione.getData() != ""> 
185                                    <figcaption> 
186                                        ${Descrizione.getData()} 
187                                    </figcaption> 
188                                </#if> 
189                            </figure> 
190                        </#if> 
191                        <p> 
192                            <#if (Testo?? && Testo.getData() != "")> 
193                                ${Testo.getData()} 
194                            </#if> 
195                            <#if (testo?? && testo.getData() != "")> 
196                                ${testo.getData()} 
197                            </#if> 
198                        </p> 
199                    </div> 
200                </div> 
201            </#if> 
202 
203            <#assign docXml = saxReaderUtil.read(currentArticle.getContent()) /> 
204            <#assign FolderPath = docXml.valueOf("//dynamic-element[@name='folder_path']/dynamic-content/text()") /> 
205 
206            <#if FolderPath?? && FolderPath != ""> 
207 
208                <#assign fileUrl = "" /> 
209                <#assign altImg = "" /> 
210                 
211                <#assign FolderPath = FolderPath?replace("%20", " ") /> 
212                <#assign isDocRoot = "false" /> 
213                <#assign imageGroupId = -1 /> 
214                <#assign imageFolderId = -1 /> 
215                 
216                <#assign folderPaths = FolderPath?split("/") /> 
217                <#list folderPaths as xPath> 
218                     
219                    <#if xPath != "/" && xPath != ""> 
220                        <#if isDocRoot == "false"> 
221                            <#if xPath == "documents"> 
222                                <#assign isDocRoot = "true" /> 
223                            </#if> 
224                        <#else> 
225                            <#if imageGroupId == -1> 
226                                <#assign tempXpath = "/" + xPath /> 
227                                <#assign targetGroup = GroupLocalServiceUtil.fetchFriendlyURLGroup(themeDisplay.getCompanyId(), tempXpath) /> 
228                                <#if targetGroup?? > 
229                                    <#assign imageGroupId = targetGroup.getGroupId() /> 
230                                    <#assign imageFolderId = 0 /> 
231                                </#if>     
232                            <#else> 
233                                    <#assign imageFolderId = DLFolderLocalServiceUtil.getFolder(imageGroupId , imageFolderId, xPath).getFolderId() /> 
234                            </#if> 
235 
236                        </#if> 
237                    </#if>     
238                </#list> 
239 
240                <#if (imageGroupId != -1 && imageFolderId != -1)> 
241                    <#assign fileEntriesFolder = DLFileEntryLocalServiceUtil.getFileEntries(imageGroupId,imageFolderId) /> 
242                    <#if fileEntriesFolder?? && (fileEntriesFolder?size > 0 ) > 
243 
244                        <#assign nowTimeStamp = .now?long /> 
245                        <div class="rt-page__content"> 
246                            <div class="rt-gallery"> 
247                                <ul class="rt-gallery__list"> 
248									<#assign sortedFileEntry = [] /> 
249									<#setting date_format="dd-MM-yyyy"> 
250									 
251									<#list fileEntriesFolder as fileEntry> 
252                                        <#if fileEntry??> 
253										<#assign imgObj = {"order":fileEntry.getModifiedDate()?date, "obj":fileEntry} /> 
254										<#assign sortedFileEntry = sortedFileEntry + [imgObj] /> 
255										</#if> 
256                                    </#list> 
257                                    <#list sortedFileEntry?sort_by("order")?reverse as cur_obj> 
258										<#assign fileEntry = cur_obj.obj /> 
259                                        <#if fileEntry??> 
260											<#if !fileEntry.isInTrash()> 
261												<#assign titleImg = fileEntry.getTitle()?html /> 
262												<#if fileEntry.getDescription()?? && fileEntry.getDescription() != ""> 
263													<#assign titleImg = fileEntry.getDescription()?html /> 
264												</#if> 
265 
266												<#assign fileUrl = "/documents/" + fileEntry.getGroupId() + "/" + fileEntry.getFolderId() + "/" + fileEntry.getTitle() + "/" + fileEntry.getUuid() />  
267												<li class="rt-gallery__item"> 
268													<a title="${titleImg}" data-lightbox="galleria-${nowTimeStamp}" href="${fileUrl?html}"> 
269														<img alt="${titleImg}" src="${fileUrl?html}"> 
270													</a> 
271												</li> 
272											</#if>	 
273                                        </#if> 
274                                    </#list> 
275                                </ul> 
276                            </div> 
277                        </div> 
278                    </#if> 
279                </#if> 
280            </#if> 
281 
282			<#if temi?? && (temi?size > 0) > 
283				<div class="rt-page__content"> 
284					<div class="rt-news-tags"> 
285						<div id="news-tags-label" class="rt-news-tags__label">Categorie:</div> 
286						<ul aria-labelledby="news-tags-label" class="rt-news-tags__list"> 
287							<#list temi as category> 
288								<li class="rt-news-tags__item"> 
289									<a title="${category}" aria-label="${category}" href="/${category}">${category}</a> 
290								</li> 
291							</#list> 
292						</ul> 
293					</div> 
294				</div> 
295			</#if> 
296 
297        </div> 
298 
299		<div class="col-md-12 col-lg-4 portlet-column portlet-column-last" id="column-3"> 
300 
301			<#assign currentArticleRelatedLinks = assetLinkLocalService.getDirectLinks(currentArticleAssetEntryId) /> 
302			<#assign hasAllegato = "false" /> 
303			<#assign hasLink = "false" /> 
304			<#if currentArticleRelatedLinks?? && currentArticleRelatedLinks?has_content> 
305				<#list currentArticleRelatedLinks as related_entry> 
306					<#assign relatedAssetEntryId = related_entry.getEntryId2() /> 
307					<#assign relatedAssetEntry = AssetEntryLocalServiceUtil.getEntry(relatedAssetEntryId) /> 
308					<#assign relatedAssetEntryPrimKey = relatedAssetEntry.getClassPK() /> 
309 
310					<#if relatedAssetEntry.getClassName() == 'com.liferay.document.library.kernel.model.DLFileEntry' > 
311						<#assign hasAllegato = "true" /> 
312					<#elseif relatedAssetEntry.getClassName() == 'com.liferay.journal.model.JournalArticle' > 
313						<#assign hasLink = "true" /> 
314					</#if> 
315				</#list> 
316			</#if> 
317 
318			<#if (hasLink == "true") > 
319				<div class="rt-sidebar-content"> 
320					<section class="rt-section rt-section--box rt-section--box-row rt-section--related rt-section--sidebar" aria-label=""> 
321						<div class="rt-section-title-wrapper"> 
322							<h3 class="rt-section-title">Notizie collegate</h3> 
323						</div> 
324						<div class="rt-section__wrapper"> 
325							<#list currentArticleRelatedLinks as related_entry> 
326								<#assign relatedAssetEntryId = related_entry.getEntryId2() /> 
327								<#assign relatedAssetEntry = AssetEntryLocalServiceUtil.getEntry(relatedAssetEntryId) /> 
328								<#assign relatedAssetEntryPrimKey = relatedAssetEntry.getClassPK() /> 
329 
330								<#if relatedAssetEntry.getClassName() == 'com.liferay.journal.model.JournalArticle' > 
331									<#assign relatedArticle = JournalArticleLocalService.getLatestArticle(relatedAssetEntryPrimKey) /> 
332									<#if relatedArticle?? && relatedArticle != ""> 
333										 
334										<#assign assetRendererRelated = relatedAssetEntry.getAssetRenderer() /> 
335										<#assign rendererURLRelated = siteBaseURL + "/-/" + assetRendererRelated.getUrlTitle() /> 
336 
337										<#assign docXml = saxReaderUtil.read(relatedArticle.getContent()) /> 
338 
339										<#assign Immagine = docXml.valueOf("//dynamic-element[@name='Immagine']/dynamic-content/text()") /> 
340										 
341										<#assign fileUrl = "" /> 
342										<#assign altImg = "" /> 
343										<#if Immagine?has_content> 
344											<#assign json = jsonFactoryUtil.createJSONObject(Immagine) /> 
345											<#assign nameImg = json.getString("name") /> 
346											<#assign altImg = json.getString("alt") /> 
347											<#assign fileEntryId = json.getLong("fileEntryId") /> 
348											<#assign uuiD = json.getString("uuid") /> 
349											<#assign groupId = json.getLong("groupId") /> 
350 
351											<#if fileEntryId != 0> 
352												<#assign fileEntry = DLFileEntryLocalServiceUtil.getFileEntry(fileEntryId) />  
353												<#assign fileUrl = "/documents/" + fileEntry.getGroupId() + "/" + fileEntry.getFolderId() + "/" + fileEntry.getTitle() + "/" + fileEntry.getUuid() />  
354											<#else> 
355												<#if groupId != 0 && uuiD != ""> 
356													<#assign fileEntry = DLFileEntryLocalServiceUtil.getFileEntryByUuidAndGroupId(uuiD,groupId) /> 
357													<#if fileEntry?? > 
358														<#assign fileUrl = "/documents/" + fileEntry.getGroupId() + "/" + fileEntry.getFolderId() + "/" + fileEntry.getTitle() + "/" + fileEntry.getUuid() />  
359													</#if>  
360												</#if> 
361											</#if> 
362										<#else> 
363											<#assign fileUrl = imagePath + "/toscana-notizie-placeholder.png" /> 
364										</#if> 
365 
366 
367										<div class="rt-box rt-box--has-image rt-box--has-image-small"> 
368											<div class="rt-box__image"> 
369												<img alt="Immagine ${relatedAssetEntry.getTitle(locale)?html}" src="${fileUrl?html}"> 
370 
371											</div> 
372 
373											<div class="rt-box__text"> 
374												<div class="rt-box__publication"> 
375													<div class="rt-box__date">${relatedAssetEntry.publishDate?string["dd MMMM"]?remove_beginning("0")}</div> 
376													<div class="rt-box__time">${relatedAssetEntry.publishDate?string["HH:mm"]?remove_beginning("0")}</div> 
377												</div> 
378 
379												<div class="rt-box__title"> 
380													<a title="Vai alla pagina ${relatedAssetEntry.getTitle(locale)?html}" aria-label="Vai alla pagina ${relatedAssetEntry.getTitle(locale)?html}" href="${rendererURLRelated?html}"> 
381														${relatedAssetEntry.getTitle(locale)?html} 
382													</a> 
383												</div> 
384											</div> 
385										</div> 
386 
387									</#if> 
388								</#if> 
389							</#list> 
390						</div> 
391					</section> 
392				</div> 
393			</#if> 
394 
395		</div> 
396	</div>	 
397</section> 
398 
399<script src="${jsPath}lightbox2/dist/js/lightbox.min.js"></script> 
400<script src="${jsPath}flexslider/jquery.flexslider-min.js"></script>