Si è verificato un errore nell'elaborarazione del modello.
The following has evaluated to null or missing:
==> ContenutoPrincipale  [in template "10154#10192#42499" at line 49, column 15]

----
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: ${ContenutoPrincipale.getData()}  [in template "10154#10192#42499" at line 49, column 13]
----
1<#setting time_zone=timeZone.ID> 
2<#setting locale=locale.toString()> 
3 
4<#assign layoutService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService") /> 
5<#assign serviceContext = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"].getServiceContext() /> 
6<#assign themeDisplay = serviceContext.getThemeDisplay() /> 
7 
8<script src="http://srv-streaming-RT-02.tix.it/res/jw/jwplayer.js" language="javascript"></script> 
9<#assign AssetEntryLocalServiceUtil = staticUtil["com.liferay.asset.kernel.service.AssetEntryLocalServiceUtil"] /> 
10<#assign JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")> 
11<#assign DLFileEntryLocalServiceUtil =  serviceLocator.findService('com.liferay.document.library.kernel.service.DLFileEntryLocalService') /> 
12 
13<#assign journalArticleId = .vars['reserved-article-id'].data/>  
14<#assign article = JournalArticleLocalService.getArticle(groupId, journalArticleId) /> 
15<#assign entry = AssetEntryLocalServiceUtil.fetchEntry("com.liferay.journal.model.JournalArticle", article.resourcePrimKey) /> 
16 
17<#assign assetRenderer = entry.getAssetRenderer() /> 
18<#assign docXml = saxReaderUtil.read(article.getContent()) /> 
19 
20 
21<style> 
22.header-title{ 
23    display:none; 
24
25.header-back-to{ 
26    display:none; 
27
28 
29.hide-content{ 
30    visibility:hidden; 
31    height : 0; 
32    padding: 0px !important; 
33    overflow: hidden; 
34
35 
36.content_para{ 
37    float:none !important; 
38
39 
40.hide-content img{ 
41    display:none; 
42
43</style> 
44             
45<div class="rt-page__content"> 
46    <div id="sub-content-main" class="rt-page__content-text has-share "> 
47        <h2 class="rt-page__title">${.vars['reserved-article-title'].data}  <@getEditIcon /> </h2> 
48        <p> 
49            ${ContenutoPrincipale.getData()} 
50        </p> 
51 
52        <div class="rt-btn rt-btn-light rt-btn-round rt-btn-share" id="sharebtn"> 
53            <span class="rt-btn-round__label">Condividi</span> <i aria-hidden="true" class="fas fa-share"></i> 
54        </div> 
55    </div> 
56</div> 
57 
58		<#assign assetLinkLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService") /> 
59		<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") /> 
60 
61		<#assign currentArticle = JournalArticleLocalService.getArticle(groupId, .vars['reserved-article-id'].data) /> 
62		<#assign currentArticleResourcePrimKey = currentArticle.getResourcePrimKey() /> 
63		<#assign currentArticleAssetEntry = assetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", currentArticleResourcePrimKey) /> 
64		<#assign currentArticleAssetEntryId = currentArticleAssetEntry.getEntryId() /> 
65		<#assign currentArticleRelatedLinks = assetLinkLocalService.getDirectLinks(currentArticleAssetEntryId) /> 
66 
67		<#assign hasAllegato = "false" /> 
68		<#assign hasLink = "false" /> 
69		<#if currentArticleRelatedLinks?? && currentArticleRelatedLinks?has_content> 
70			<#list currentArticleRelatedLinks as related_entry> 
71				<#assign relatedAssetEntryId = related_entry.getEntryId2() /> 
72				<#assign relatedAssetEntry = assetEntryLocalService.getEntry(relatedAssetEntryId) /> 
73				<#assign relatedAssetEntryPrimKey = relatedAssetEntry.getClassPK() /> 
74 
75				<#if relatedAssetEntry.getClassName() == 'com.liferay.document.library.kernel.model.DLFileEntry' > 
76					<#assign hasAllegato = "true" /> 
77				<#elseif relatedAssetEntry.getClassName() == 'com.liferay.journal.model.JournalArticle' > 
78					<#assign hasLink = "true" /> 
79				</#if> 
80			</#list> 
81		</#if> 
82		 
83		<#if FotoGallery?? && FotoGallery.getData()?has_content> 
84			<#assign galleriaFotoJson = jsonFactoryUtil.createJSONObject(FotoGallery.getData()) /> 
85			<#assign classPKGalleriaFoto = galleriaFotoJson.getLong("classPK") /> 
86			<#if (classPKGalleriaFoto > 0)> 
87				<#assign galleriaFotoAsset = AssetEntryLocalServiceUtil.fetchEntry("com.liferay.journal.model.JournalArticle", classPKGalleriaFoto) /> 
88				<#if galleriaFotoAsset?? > 
89					<#assign assetRendererGalleriaFoto = galleriaFotoAsset.getAssetRenderer() /> 
90					<#assign articleGalleriaFoto = assetRendererGalleriaFoto.getArticle() />  
91					<#assign articleContentFoto = journalContentUtil.getContent(articleGalleriaFoto.groupId, articleGalleriaFoto.articleId, "", locale.toString(), themeDisplay) /> 
92					 
93					${articleContentFoto} 
94				</#if> 
95			</#if>  
96		</#if> 
97		 
98		<#if VideoGallery?? && VideoGallery.getData()?has_content> 
99			<#assign galleriaVideoJson = jsonFactoryUtil.createJSONObject(VideoGallery.getData()) /> 
100			<#assign classPKGalleriaVideo = galleriaVideoJson.getLong("classPK") /> 
101			<#if (classPKGalleriaVideo > 0)> 
102				<#assign galleriaVideoAsset = AssetEntryLocalServiceUtil.fetchEntry("com.liferay.journal.model.JournalArticle", classPKGalleriaVideo) /> 
103				<#if galleriaVideoAsset?? > 
104					<#assign assetRendererGalleriaVideo = galleriaVideoAsset.getAssetRenderer() /> 
105					<#assign articleGalleriaVideo = assetRendererGalleriaVideo.getArticle() />  
106					<#assign articleContentVideo = journalContentUtil.getContent(articleGalleriaVideo.groupId, articleGalleriaVideo.articleId, "", locale.toString(), themeDisplay) /> 
107					 
108					${articleContentVideo} 
109				</#if> 
110			</#if>  
111		</#if> 
112 
113        <div class="rt-page__content"> 
114 
115            <@getLinkAndAllegati /> 
116 
117        </div> 
118 
119		<div class="rt-update-informations"> 
120			<div class="rt-update-informations__row"> 
121				<div class="rt-update-informations__info rt-update-informations__info--updated"> 
122					<i aria-hidden="true" class="far fa-calendar-edit"></i> 
123					<div class="rt-update-informations__info-label">Aggiornato al:</div> 
124					<div class="rt-update-informations__info-value"><strong>${article.modifiedDate?string["dd.MM.yyyy"]}</strong></div> 
125				</div> 
126				 
127				<div class="rt-update-informations__info rt-update-informations__info--id"> 
128                        <i aria-hidden="true" class="far fa-hashtag"></i> 
129                    <div class="rt-update-informations__info-label">Article ID:</div> 
130                    <div class="rt-update-informations__info-value"><strong>${article.getArticleId()}</strong></div> 
131                </div> 
132			</div> 
133		</div> 
134 
135<#macro getLinkAndAllegati> 
136	<#assign assetLinkLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService") /> 
137	<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") /> 
138	<#assign JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")> 
139	 
140	<#assign currentArticle = JournalArticleLocalService.getArticle(groupId, .vars['reserved-article-id'].data) /> 
141	<#assign currentArticleResourcePrimKey = currentArticle.getResourcePrimKey() /> 
142	<#assign currentArticleAssetEntry = assetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", currentArticleResourcePrimKey) /> 
143	<#assign currentArticleAssetEntryId = currentArticleAssetEntry.getEntryId() /> 
144	<#assign currentArticleRelatedLinks = assetLinkLocalService.getDirectLinks(currentArticleAssetEntryId) /> 
145 
146	<#assign hasAllegato = "false" /> 
147	<#assign hasLink = "false" /> 
148	<#if currentArticleRelatedLinks?? && currentArticleRelatedLinks?has_content> 
149		<#list currentArticleRelatedLinks as related_entry> 
150			<#assign relatedAssetEntryId = related_entry.getEntryId2() /> 
151			<#assign relatedAssetEntry = assetEntryLocalService.getEntry(relatedAssetEntryId) /> 
152			<#assign relatedAssetEntryPrimKey = relatedAssetEntry.getClassPK() /> 
153 
154			<#if relatedAssetEntry.getClassName() == 'com.liferay.document.library.kernel.model.DLFileEntry' > 
155				<#assign hasAllegato = "true" /> 
156			<#elseif relatedAssetEntry.getClassName() == 'com.liferay.journal.model.JournalArticle' > 
157				<#assign hasLink = "true" /> 
158			</#if> 
159		</#list> 
160	</#if> 
161 
162	<#if (TitoloLinkUtile?? && TitoloLinkUtile.getData()?has_content && TitoloLinkUtile.getSiblings()?has_content) 
163		|| (hasLink == "true") || (TitoloAllegato?? && TitoloAllegato.getData()?has_content && TitoloAllegato.getSiblings()?has_content) 
164		|| (hasAllegato == "true")> 
165		<div class="rt-page__content"> 
166		<section class="rt-section rt-section--box rt-section--box-col rt-section--box-col-2" aria-label="Sezione link e allegati"> 
167			<div class="rt-section-title-wrapper"> 
168				<h2 class="rt-section-title">Link e allegati</h2> 
169			</div> 
170			<div class="rt-section__wrapper"> 
171				 
172				<#if (TitoloLinkUtile?? && TitoloLinkUtile.getData()?has_content && TitoloLinkUtile.getSiblings()?has_content)> 
173 
174					<#assign links = docXml.getRootElement().selectNodes("//dynamic-element[@name='TitoloLinkUtile']") /> 
175					<#list links as linkXML> 
176						<#assign titoloLink = linkXML.elementText("dynamic-content") /> 
177						<#assign link = linkXML.valueOf("//dynamic-element[@name='Link']/dynamic-content/text()") /> 
178						 
179						<#assign subfields = linkXML.elements("dynamic-element")> 
180						<#list subfields as subfield > 
181							<#if subfield.attributeValue("name") == "Link" && titoloLink?? && titoloLink != ""> 
182								<#assign link = subfield.elementText("dynamic-content") /> 
183								<div class="rt-box rt-box--link"> 
184									<div class="rt-box__header"> 
185										<div class="rt-box__wrapper"> 
186											<div class="rt-box__title"> 
187												<#if link?html?starts_with("www")> 
188													<a target="_blank" href="//${link?html}" aria-label="Vedi ${titoloLink?html}" title="Vedi ${titoloLink?html}"> 
189														${titoloLink?html} 
190													</a> 
191												<#else> 
192													<a target="_blank" href="${link?html}" aria-label="Vedi ${titoloLink?html}" title="Vedi ${titoloLink?html}"> 
193														${titoloLink?html} 
194													</a> 
195												</#if> 
196												 
197											</div> 
198										</div> 
199 
200										<div class="rt-box__icon"> 
201											<i aria-hidden="true" class="far fa-link"></i> 
202										</div> 
203									</div> 
204								</div> 
205 
206								 
207							</#if>                             
208						</#list> 
209					</#list> 
210 
211					 
212				</#if> 
213				 
214				 
215				<#if hasLink == "true"> 
216					<#list currentArticleRelatedLinks as related_entry> 
217						<#assign relatedAssetEntryId = related_entry.getEntryId2() /> 
218						<#assign relatedAssetEntry = assetEntryLocalService.getEntry(relatedAssetEntryId) /> 
219						<#assign relatedAssetEntryPrimKey = relatedAssetEntry.getClassPK() /> 
220 
221						<#if relatedAssetEntry.getClassName() == 'com.liferay.journal.model.JournalArticle' > 
222							<#assign relatedArticle = JournalArticleLocalService.getLatestArticle(relatedAssetEntryPrimKey) /> 
223							<#if relatedArticle?? && relatedArticle != ""> 
224								<div class="rt-box rt-box--link"> 
225									<div class="rt-box__header"> 
226										<div class="rt-box__wrapper"> 
227											<div class="rt-box__title"> 
228												<a target="_blank" href="/-/${relatedArticle.getUrlTitle()}" aria-label="Vedi ${relatedArticle.getTitle()}" title="Vedi ${relatedArticle.getTitle()}"> 
229													${relatedArticle.getTitle()} 
230												</a> 
231											</div> 
232										</div> 
233 
234										<div class="rt-box__icon"> 
235											<i aria-hidden="true" class="far fa-link"></i> 
236										</div> 
237									</div> 
238								</div> 
239							</#if> 
240						</#if> 
241					</#list> 
242				</#if> 
243 
244 
245				<#if (TitoloAllegato?? && TitoloAllegato.getData()?has_content && TitoloAllegato.getSiblings()?has_content)> 
246 
247					<#assign allegati = docXml.getRootElement().selectNodes("//dynamic-element[@name='TitoloAllegato']") /> 
248					<#list allegati as allegatoXML> 
249					 
250						<#assign titoloAllegato = allegatoXML.elementText("dynamic-content") /> 
251						<#assign allegato = allegatoXML.valueOf("//dynamic-element[@name='Allegato']/dynamic-content/text()") /> 
252						 
253						<#assign subfields = allegatoXML.elements("dynamic-element")> 
254						<#list subfields as subfield > 
255							<#if subfield.attributeValue("name") == "Allegato" && titoloAllegato?? && titoloAllegato != ""> 
256								<#assign allegato = subfield.elementText("dynamic-content") /> 
257								<#assign json = jsonFactoryUtil.createJSONObject(allegato) /> 
258											 
259								<#assign nameImg = json.getString("name") /> 
260								<#assign altImg = json.getString("alt") /> 
261								<#assign fileEntryId = json.getLong("fileEntryId") /> 
262								<#assign uuiD = json.getString("uuid") /> 
263								<#assign groupId = json.getLong("groupId") /> 
264 
265								<#if fileEntryId != 0> 
266									<#assign fileEntry = DLFileEntryLocalServiceUtil.getFileEntry(fileEntryId) />  
267									<#assign fileUrl = "/documents/" + fileEntry.getGroupId() + "/" + fileEntry.getFolderId() + "/" + fileEntry.getTitle() + "/" + fileEntry.getUuid() />  
268								<#else> 
269									<#if groupId != 0 && uuiD != ""> 
270										<#assign fileEntry = DLFileEntryLocalServiceUtil.getFileEntryByUuidAndGroupId(uuiD,groupId) /> 
271										<#if fileEntry?? > 
272											<#assign fileUrl = "/documents/" + fileEntry.getGroupId() + "/" + fileEntry.getFolderId() + "/" + fileEntry.getTitle() + "/" + fileEntry.getUuid() />  
273										</#if> 
274									</#if> 
275								</#if> 
276								<div class="rt-box rt-box--link"> 
277									<div class="rt-box__header"> 
278										<div class="rt-box__wrapper"> 
279											<div class="rt-box__title"> 
280												<a target="_blank" href="${fileUrl}" aria-label="Vedi ${titoloAllegato?html}" title="Vedi ${titoloAllegato?html}"> 
281													${titoloAllegato?html} 
282												</a> 
283											</div> 
284										</div> 
285										<div class="rt-box__icon"> 
286											<i aria-hidden="true" class="far fa-download"></i> 
287										</div> 
288									</div> 
289								</div> 
290 
291							</#if> 
292						</#list>		 
293					</#list> 
294 
295				</#if> 
296 
297				<#if hasAllegato == "true"> 
298					<#list currentArticleRelatedLinks as related_entry> 
299						<#assign relatedAssetEntryId = related_entry.getEntryId2() /> 
300						<#assign relatedAssetEntry = assetEntryLocalService.getEntry(relatedAssetEntryId) /> 
301						<#assign relatedAssetEntryPrimKey = relatedAssetEntry.getClassPK() /> 
302 
303						<#if relatedAssetEntry.getClassName() == 'com.liferay.document.library.kernel.model.DLFileEntry' > 
304							<#assign fileEntry = DLFileEntryLocalServiceUtil.getFileEntry(relatedAssetEntryPrimKey) /> 
305							<#assign fileUrl = "/documents/" + fileEntry.getGroupId() + "/" + fileEntry.getFolderId() + "/" + fileEntry.getTitle() + "/" + fileEntry.getUuid() /> 
306							<#if fileEntry?? && fileUrl != ""> 
307								<div class="rt-box rt-box--link"> 
308									<div class="rt-box__header"> 
309										<div class="rt-box__wrapper"> 
310											<div class="rt-box__title"> 
311												<a target="_blank" href="${fileUrl}" aria-label="Vedi ${fileEntry.getTitle()}" title="Vedi ${fileEntry.getTitle()}"> 
312													${fileEntry.getTitle()} 
313												</a> 
314											</div> 
315										</div> 
316 
317										<div class="rt-box__icon"> 
318											<i aria-hidden="true" class="far fa-download"></i> 
319										</div> 
320									</div> 
321								</div> 
322							</#if> 
323						</#if> 
324					</#list> 
325				</#if> 
326			</div> 
327		</section> 
328		</div> 
329	</#if> 
330 
331</#macro> 
332 
333<#macro getEditIcon> 
334	<#if assetRenderer.hasEditPermission(themeDisplay.getPermissionChecker())> 
335		<#if renderResponse?? > 
336			<#assign redirectURL = renderResponse.createRenderURL() /> 
337			<#assign entryTitle = htmlUtil.escape(.vars['reserved-article-title'].data?html) /> 
338			${redirectURL.setParameter("mvcPath", "/add_asset_redirect.jsp")} 
339			${redirectURL.setWindowState("pop_up")} 
340 
341			<#assign editPortletURL = assetRenderer.getURLEdit(renderRequest, renderResponse, windowStateFactory.getWindowState("pop_up"), redirectURL)!"" /> 
342 
343			<#if validator.isNotNull(editPortletURL)> 
344				<#assign title = languageUtil.format(locale, "edit-x", entryTitle, false) /> 
345 
346				<@liferay_ui["icon"] 
347					cssClass="icon-monospaced visible-interaction" 
348					icon="pencil" 
349					markupView="lexicon" 
350					message=title 
351					url="javascript:Liferay.Util.openWindow({id:'" + renderResponse.getNamespace() + "editAsset', title: '" + title + "', uri:'" + htmlUtil.escapeURL(editPortletURL.toString()) + "'});" 
352				/> 
353			</#if> 
354		</#if>	 
355	</#if> 
356</#macro>