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