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

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