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 
249                                    <#list fileEntriesFolder as fileEntry> 
250                                        <#if fileEntry??> 
251											<#if !fileEntry.isInTrash()> 
252												<#assign titleImg = fileEntry.getTitle()?html /> 
253												<#if fileEntry.getDescription()?? && fileEntry.getDescription() != ""> 
254													<#assign titleImg = fileEntry.getDescription()?html /> 
255												</#if> 
256 
257												<#assign fileUrl = "/documents/" + fileEntry.getGroupId() + "/" + fileEntry.getFolderId() + "/" + fileEntry.getTitle() + "/" + fileEntry.getUuid() />  
258												<li class="rt-gallery__item"> 
259													<a title="${titleImg}" data-lightbox="galleria-${nowTimeStamp}" href="${fileUrl?html}"> 
260														<img alt="${titleImg}" src="${fileUrl?html}"> 
261													</a> 
262												</li> 
263											</#if>	 
264                                        </#if> 
265                                    </#list> 
266                                </ul> 
267                            </div> 
268                        </div> 
269                    </#if> 
270                </#if> 
271            </#if> 
272 
273			<#if temi?? && (temi?size > 0) > 
274				<div class="rt-page__content"> 
275					<div class="rt-news-tags"> 
276						<div id="news-tags-label" class="rt-news-tags__label">Categorie:</div> 
277						<ul aria-labelledby="news-tags-label" class="rt-news-tags__list"> 
278							<#list temi as category> 
279								<li class="rt-news-tags__item"> 
280									<a title="${category}" aria-label="${category}" href="/${category}">${category}</a> 
281								</li> 
282							</#list> 
283						</ul> 
284					</div> 
285				</div> 
286			</#if> 
287 
288        </div> 
289 
290		<div class="col-md-12 col-lg-4 portlet-column portlet-column-last" id="column-3"> 
291 
292			<#assign currentArticleRelatedLinks = assetLinkLocalService.getDirectLinks(currentArticleAssetEntryId) /> 
293			<#assign hasAllegato = "false" /> 
294			<#assign hasLink = "false" /> 
295			<#if currentArticleRelatedLinks?? && currentArticleRelatedLinks?has_content> 
296				<#list currentArticleRelatedLinks as related_entry> 
297					<#assign relatedAssetEntryId = related_entry.getEntryId2() /> 
298					<#assign relatedAssetEntry = AssetEntryLocalServiceUtil.getEntry(relatedAssetEntryId) /> 
299					<#assign relatedAssetEntryPrimKey = relatedAssetEntry.getClassPK() /> 
300 
301					<#if relatedAssetEntry.getClassName() == 'com.liferay.document.library.kernel.model.DLFileEntry' > 
302						<#assign hasAllegato = "true" /> 
303					<#elseif relatedAssetEntry.getClassName() == 'com.liferay.journal.model.JournalArticle' > 
304						<#assign hasLink = "true" /> 
305					</#if> 
306				</#list> 
307			</#if> 
308 
309			<#if (hasLink == "true") > 
310				<div class="rt-sidebar-content"> 
311					<section class="rt-section rt-section--box rt-section--box-row rt-section--related rt-section--sidebar" aria-label=""> 
312						<div class="rt-section-title-wrapper"> 
313							<h3 class="rt-section-title">Notizie collegate</h3> 
314						</div> 
315						<div class="rt-section__wrapper"> 
316							<#list currentArticleRelatedLinks as related_entry> 
317								<#assign relatedAssetEntryId = related_entry.getEntryId2() /> 
318								<#assign relatedAssetEntry = AssetEntryLocalServiceUtil.getEntry(relatedAssetEntryId) /> 
319								<#assign relatedAssetEntryPrimKey = relatedAssetEntry.getClassPK() /> 
320 
321								<#if relatedAssetEntry.getClassName() == 'com.liferay.journal.model.JournalArticle' > 
322									<#assign relatedArticle = JournalArticleLocalService.getLatestArticle(relatedAssetEntryPrimKey) /> 
323									<#if relatedArticle?? && relatedArticle != ""> 
324										 
325										<#assign assetRendererRelated = relatedAssetEntry.getAssetRenderer() /> 
326										<#assign rendererURLRelated = siteBaseURL + "/-/" + assetRendererRelated.getUrlTitle() /> 
327 
328										<#assign docXml = saxReaderUtil.read(relatedArticle.getContent()) /> 
329 
330										<#assign Immagine = docXml.valueOf("//dynamic-element[@name='Immagine']/dynamic-content/text()") /> 
331										 
332										<#assign fileUrl = "" /> 
333										<#assign altImg = "" /> 
334										<#if Immagine?has_content> 
335											<#assign json = jsonFactoryUtil.createJSONObject(Immagine) /> 
336											<#assign nameImg = json.getString("name") /> 
337											<#assign altImg = json.getString("alt") /> 
338											<#assign fileEntryId = json.getLong("fileEntryId") /> 
339											<#assign uuiD = json.getString("uuid") /> 
340											<#assign groupId = json.getLong("groupId") /> 
341 
342											<#if fileEntryId != 0> 
343												<#assign fileEntry = DLFileEntryLocalServiceUtil.getFileEntry(fileEntryId) />  
344												<#assign fileUrl = "/documents/" + fileEntry.getGroupId() + "/" + fileEntry.getFolderId() + "/" + fileEntry.getTitle() + "/" + fileEntry.getUuid() />  
345											<#else> 
346												<#if groupId != 0 && uuiD != ""> 
347													<#assign fileEntry = DLFileEntryLocalServiceUtil.getFileEntryByUuidAndGroupId(uuiD,groupId) /> 
348													<#if fileEntry?? > 
349														<#assign fileUrl = "/documents/" + fileEntry.getGroupId() + "/" + fileEntry.getFolderId() + "/" + fileEntry.getTitle() + "/" + fileEntry.getUuid() />  
350													</#if>  
351												</#if> 
352											</#if> 
353										<#else> 
354											<#assign fileUrl = imagePath + "/toscana-notizie-placeholder.png" /> 
355										</#if> 
356 
357 
358										<div class="rt-box rt-box--has-image rt-box--has-image-small"> 
359											<div class="rt-box__image"> 
360												<img alt="Immagine ${relatedAssetEntry.getTitle(locale)?html}" src="${fileUrl?html}"> 
361 
362											</div> 
363 
364											<div class="rt-box__text"> 
365												<div class="rt-box__publication"> 
366													<div class="rt-box__date">${relatedAssetEntry.publishDate?string["dd MMMM"]?remove_beginning("0")}</div> 
367													<div class="rt-box__time">${relatedAssetEntry.publishDate?string["HH:mm"]?remove_beginning("0")}</div> 
368												</div> 
369 
370												<div class="rt-box__title"> 
371													<a title="Vai alla pagina ${relatedAssetEntry.getTitle(locale)?html}" aria-label="Vai alla pagina ${relatedAssetEntry.getTitle(locale)?html}" href="${rendererURLRelated?html}"> 
372														${relatedAssetEntry.getTitle(locale)?html} 
373													</a> 
374												</div> 
375											</div> 
376										</div> 
377 
378									</#if> 
379								</#if> 
380							</#list> 
381						</div> 
382					</section> 
383				</div> 
384			</#if> 
385 
386		</div> 
387	</div>	 
388</section> 
389 
390<script src="${jsPath}lightbox2/dist/js/lightbox.min.js"></script> 
391<script src="${jsPath}flexslider/jquery.flexslider-min.js"></script>