Breadcrumb

Asset Publisher

null ASL Napoli 3 Sud: Visiting Therapy Center Program

An error occurred while processing the template.
Java method "com.sun.proxy.$Proxy1228.getArticle(long, String)" threw an exception when invoked on com.sun.proxy.$Proxy1228 object "com.liferay.journal.service.impl.JournalArticleServiceImpl@3b93caf4"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign article = journalArticleLocal...  [in template "20097#20123#" at line 43, column 41]
----
1<#assign css_folder=themeDisplay.getPathThemeCss() /> 
2<#assign images_folder=themeDisplay.getPathThemeImages() /> 
3<#assign javascript_folder = themeDisplay.getPathThemeJavaScript()/> 
4<#-- RECUPERO DATI --> 
5<#assign pathPrimoAllegato = (Titolo.nomeAllegato.FileMedia.getSiblings()[0].getData()) />  
6 <#assign dataPub = .vars['reserved-article-display-date'].data /> 
7    <#-- Save the original page locale for later --> 
8	<#assign originalLocale = .locale> 
9    <#-- Set the page locale to the portals default locale --> 
10	<#setting locale = localeUtil.getDefault()> 
11	<#-- Parse the date to a date object --> 
12	<#assign dataPub = dataPub?datetime("EEE, d MMM yyyy HH:mm:ss Z")> 
13	<#-- Set the page locale back to the original page locale --> 
14	<#-- Set the page locale back to the original page locale --> 
15	<#setting locale = originalLocale> 
16 
17<#-- FINE RECUPERO DATI --> 
18 
19 
20 
21<main class=""> 
22  <section class="section  mt-7"> 
23        <div class="container"> 
24           
25<#assign DataNotizia_Data = getterUtil.getString(Titolo.dataNotizia.getData())> 
26 
27 
28  <div class="customTab col-lg-12" style="margin-top:-7%; padding-top: 0"> <!-- prima colonna --> 
29    <div class="subtitle mb-3"> 
30	 
31	<!-- 
32	<p class="mb-3"> 
33	--> 
34                     
35				 
36			<!-- DA PROVARE DOPO RIAVVIO --> 
37					<#assign AssetEntryLocalServiceUtil = objectUtil("com.liferay.asset.kernel.service.AssetEntryLocalServiceUtil") /> 
38					 
39					<#-- assign assetService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetTagLocalService")  --> 
40					 
41					<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleService") /> 
42					 
43					<#assign article = journalArticleLocalService.getArticle(getterUtil.getLong(scopeGroupId), .vars['reserved-article-id'].data)> 
44 
45<#assign resourcePrimKey = article.getResourcePrimKey() /> 
46    
47   <#assign entry = AssetEntryLocalServiceUtil.getEntry("com.liferay.journal.model.JournalArticle", resourcePrimKey) /> 
48 
49<#assign tagName = "" /> 
50<#if entry?? && entry.getTags()?size != 0 > 
51<#assign tags = entry.getTags() />			 
52  <#list tags as tag> 
53 
54		<#assign tagName = tag.getName() /> 
55		 
56		 
57		 
58</#list>		 
59</#if>			 
60			 
61 
62					 
63					 
64					 
65				 
66					<#if NomeTag??> 
67						${NomeTag.getData()} 
68					<#else> 
69					 
70						<#if tagName?upper_case == "NEWSS"> 
71					 
72							 
73							<a href="/notizie"  style="text-decoration: none;" class="btn-secondary tag-news mr-2">NOTIZIE 
74							 
75						<#else> 
76							 
77							<#if tagName?upper_case == "VIDEOs"> 
78							 
79								<a href="/video-gallery" style="text-decoration: none;" class="btn-secondary tag-news  mr-2">VIDEO GALLERY 
80								 
81							<#else> 
82								<#if tagName?upper_case == "COMUNICATI STAMPA"> 
83									<a href="/comunicati-stampa" style="text-decoration: none;" class="btn-secondary tag-news mr-2"> COMUNICATI STAMPA 
84								</#if> 
85								 
86							</#if> 
87						 
88						</#if> 
89					</#if> 
90					 
91					</a> 
92               
93<!-- 
94			  </p>   
95	--> 
96	 
97	 
98 
99	 
100 
101	</div>  
102 
103	 
104	 <h1 class="titolo text-primary" style="font-size: 2rem !important;font-weight: 700 !important;">${Titolo.getData()}</h1> 
105	 <#if Titolo.Sottotitolo?? && Titolo.Sottotitolo.getData()!=""> 
106	 	 <h5 class="subtitle giust" >${Titolo.Sottotitolo.getData()}</h5> 
107	 	</#if> 
108	<#if validator.isNotNull(DataNotizia_Data)> 
109	<#assign DataNotizia_DateObj = dateUtil.parseDate("yyyy-MM-dd", DataNotizia_Data, locale)> 
110 
111	${dateUtil.getDate(DataNotizia_DateObj, "dd/MM/yyyy", locale)} 
112 
113	 
114	<!--#else> 
115	${dataPub?string["dd/MM/yyyy"]}--> 
116	</#if> 
117	 
118 
119 
120 
121 <#if tagName?? && tagName?upper_case != "VIDEO"> 
122 <#if Titolo.Foto.getData()?? && Titolo.Foto.getData() != ""> 
123	<img class="mb-4 img-fluid  mt-3" data-fileentryid="${Titolo.Foto.getAttribute('fileEntryId')}" alt="${Titolo.Foto.getAttribute('alt')}" src="${Titolo.Foto.getData()}"   style="width: 100% !important;" /> 
124 
125 </#if> 
126</#if> 
127 
128<#if Titolo.LinkVideo?? && Titolo.LinkVideo.getData() != ""> 
129    <#assign videoUrl = Titolo.LinkVideo.getData() /> 
130    <#assign isLocal = videoUrl?starts_with("/documents/") /> 
131    <#assign isYouTube = videoUrl?contains("youtube.com/watch") || videoUrl?contains("youtu.be/") /> 
132 
133    <p class="text-center"> 
134        <#if isLocal> 
135            <!-- Se il video è un file locale --> 
136            <video controls width="700" height="394"> 
137                <source src="${videoUrl}" type="video/mp4"> 
138                Il tuo browser non supporta il tag video. 
139            </video> 
140        <#elseif isYouTube> 
141            
142 
143            <!-- Estrazione sicura dell'ID del video --> 
144            <#assign videoId = "" /> 
145            <#if videoUrl?contains("watch?v=")> 
146                <#assign videoId = videoUrl?split("watch?v=")[1]?split("&")[0] /> 
147            <#elseif videoUrl?contains("youtu.be/")> 
148                <#assign videoId = videoUrl?split("youtu.be/")[1]?split("?")[0] /> 
149            </#if> 
150 
151             
152            <!-- Se l'ID non è vuoto, mostra l'iframe --> 
153            <#if videoId != ""> 
154<iframe width="700" height="394" 
155    id="youtubeFrame" 
156    frameborder="0" 
157    allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" 
158    allowfullscreen> 
159</iframe> 
160 
161<script> 
162    document.addEventListener("DOMContentLoaded", function() { 
163        var iframe = document.getElementById("youtubeFrame"); 
164        iframe.src = "https://www.youtube.com/embed/${videoId}?rel=0&modestbranding=1&showinfo=0"; 
165    }); 
166</script> 
167 
168            <#else> 
169                <p style="color: red;">Errore: impossibile estrarre l'ID del video.</p> 
170            </#if> 
171        <#else> 
172            <!-- Se il video è un altro file esterno diretto --> 
173            <video controls width="700" height="394"> 
174                <source src="${videoUrl}" type="video/mp4"> 
175                Il tuo browser non supporta il tag video. 
176            </video> 
177        </#if> 
178    </p> 
179</#if> 
180 
181 
182 
183<span class="giust">${Titolo.Contenuto.getData()} </span> 
184 
185<#if pathPrimoAllegato?has_content> 
186 
187    <div class="mt-2"> 
188    <h5 class="text-primary fw-bold">ALLEGATI</h5> 
189            <#list Titolo.nomeAllegato.getSiblings() as cur_nomeAllegato> 
190                <#if cur_nomeAllegato.getData()?has_content> 
191                <a target="_blank" href="${cur_nomeAllegato.FileMedia.getData()}"> 
192                        <img style="vertical-align: text-top;" src="${images_folder}/doc-ico.png" width="20" height="20" aria-label="documento"> ${cur_nomeAllegato.getData()} 
193                    </a> 
194                    <br/> 
195                <#elseif cur_nomeAllegato.FileMedia??> 
196                    <#if cur_nomeAllegato.FileMedia.getData()?last_index_of("/") != -1> 
197                        <#assign filepath = cur_nomeAllegato.FileMedia.getData()?substring(0, cur_nomeAllegato.FileMedia.getData()?last_index_of("/"))> 
198                        <#assign filename = filepath?substring(filepath?last_index_of("/") + 1)> 
199                         <a target="_blank" href="${cur_nomeAllegato.FileMedia.getData()}"> 
200                        <img style="vertical-align: text-top;" src="${images_folder}/doc-ico.png" width="20" height="20" aria-label="documento"> ${filename}<br/> 
201                        </a> 
202                    <#else> 
203                        <#assign filename = cur_nomeAllegato.FileMedia.getData()> 
204                         
205                    </#if> 
206                    
207                </#if> 
208            </#list> 
209        </div> 
210</#if> 
211  </div> <!-- chiusura prima colonna --> 
212  
213     <div class="row mt-4" > 
214 
215                            <div class="col-12 text-right"> 
216                                <h5><a class="exp btn-link" href="javascript:if(window.print)window.print()"><i class="fa fa-print"></i></a></h5> 
217                            </div> 
218                        </div> 
219  
220 </div> 
221 </section> 
222  
223 </main> 
224 
225 
226 
227 
228<#-- CSS PER NASCONDERE IL TITOLO DEL WEB CONTENT --> 
229<style type="text/css"> 
230.header-title{display: none;} 
231 
232 
233/* modifico */ 
234 
235.asset-full-content { 
236    display: block; 
237 
238	/*border: 1px solid red;*/ 
239} 
240 
241 
242 
243.mainHeader { 
244  padding: 120px 0 80px; 
245} 
246 
247<#-- DIV PER IL BANNER SOPRA --> 
248   <div class="mainHeader header05"> 
249        <div class="container"> 
250          <div class="mainHeader-inner"> 
251            <h3>News &amp; Media</h3> 
252            <h1>Notizie ed eventi</h1> 
253          </div> 
254        </div> 
255      </div> 
256<#-- FINE DIV PER BANNER --> 
257 
258 
259<#-- =================== PARTI GENERICHE ======================== --> 
260 
261<#--  
262<textarea style="height: 800px; width: 500px;"> 
263${docTotale}  
264 
265</textarea> 
266--> 
267 
268<#-- ===================	PER RECUPERARE IL JSON DELLA STRUTTURA =================== 
269<#assign  structureKey = DDMStructureLocalService.getStructure(134816) /> 
270 
271 <h1>${structureKey}</h1> --> 
272 
273 
274<#-- =================== FINE PARTI GENERICHE =================== --> 
275 
276 
277<#-- =================== INIZIO PARTE NEWS LOOP  =================== --> 
278 
279 <main class=""> 
280      <section class="section"> 
281        <div class="container"> 
282 
283<#if entries?has_content> 
284	 
285	<#assign idxLoop = 0 /> 
286	 
287	<#list entries as curEntry> <#-- INIZIO LOOP (indici 0-based)--> 
288 
289 
290<#assign idxLoop = curEntry?index /> 
291 
292<#if idxLoop % 4 == 0 > 
293 
294<#if idxLoop != 0> <#-- se non è il primo gruppo di 4 elementi chiudo il precedente --> 
295</div> 
296</#if> 
297 
298<#-- inizio il nuovo gruppo --> 
299<div class="row mb-5"> 
300</#if> 
301 
302 
303<#-- A GRUPPI DI 4 ELEMENTI DELLA LISTA DEVO GENERARE LA STRUTTURA <div class="row mb-5"> --> 
304 
305<#assign newsTitle = curEntry.getTitle(locale) /> 
306<#assign newsSummary = curEntry.getSummary(locale) /> 
307<#assign dataPub = curEntry.getPublishDate() /> 
308 
309 
310 
311<#assign renderer = curEntry.getAssetRenderer() /> 
312<#assign Article = renderer.getArticle() /> 
313<#assign smallImageID = Article.getSmallImageId() /> 
314<#if smallImageID??> 
315<#assign  smallImageURL = "/image/image_gallery?img_id=${smallImageID}" /> 
316<#else> 
317<#assign  smallImageURL = Article.getSmallImageURL() /> 
318</#if> 
319 
320<#assign  viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, curEntry) /> 
321<#assign viewURLAsset = renderer.getURLViewInContext(renderRequest, renderResponse, viewURL)  /> 
322 
323 
324 
325<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")> 
326<#assign DDMStructureLocalService = serviceLocator.findService("com.liferay.dynamic.data.mapping.service.DDMStructureLocalService") > 
327<#assign article = journalArticleLocalService.getLatestArticle(Article.resourcePrimKey) /> 
328<#assign docTotale = article.getContentByLocale(localeUtil.toLanguageId(localeUtil.getDefault())) /> 
329<#assign doc = saxReaderUtil.read(article.getContentByLocale(localeUtil.toLanguageId(localeUtil.getDefault()))) /> 
330 
331<#-- INIZIO LETTURA CAMPI --> 
332<#assign rootElement = doc.getRootElement() /> 
333<#assign  news = rootElement.selectNodes("/Titolo") /> 
334 
335<#assign titoloNodePath = saxReaderUtil.createXPath("dynamic-element[@name='Titolo']") /> 
336<#assign titoloNode = titoloNodePath.selectSingleNode(rootElement) /> 
337 
338<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-content")  /> 
339<#assign titoloVal = xPathSelector.selectSingleNode(titoloNode).getStringValue() /> 
340 
341<#assign xPathData = saxReaderUtil.createXPath("dynamic-element[@name='DataNotizia']/dynamic-content")  /> 
342<#assign dataNotizia = xPathData.selectSingleNode(titoloNode).getStringValue() /> 
343 
344<#assign xPathAbstract = saxReaderUtil.createXPath("dynamic-element[@name='Abstract']/dynamic-content")  /> 
345<#assign abstract = xPathAbstract.selectSingleNode(titoloNode).getStringValue() /> 
346 
347<#assign xPathFoto = saxReaderUtil.createXPath("dynamic-element[@name='Foto']/dynamic-content")  /> 
348<#assign fotoLink = xPathFoto.selectSingleNode(titoloNode).getStringValue() /> 
349 
350 
351<#-- ========== COSTRUZIONE HTML SINGOLA NEWS ==================== --> 
352 
353<!-- 
354<h2 style="color:red">${viewURL}</h2> 
355<h2 style="color:green">${viewURLAsset}</h2> 
356 
357?replace('wm9stv169C42','WBh1QsINxArE') 
358--> 
359 
360 
361 
362 
363 <div class="col-lg-3 col-12"> 
364              <a href="${viewURLAsset}" class="news-card card"> 
365                <div class="img-box"> 
366                   
367				  <#if fotoLink?? && fotoLink != ""> 
368						<img src="${fotoLink}" alt=""> 
369				  </#if> 
370				  
371                </div> 
372                 
373              </a> 
374			  
375                  
376				<#if fotoLink?? && fotoLink != ""> 
377					<h5 class="titolinews mt-4">${titoloVal}</h5>    
378				<#else> 
379					<a href="${viewURLAsset}" class="news-card card"><h5 class="titolinews mt-4">${titoloVal}</h5>  </a> 
380				</#if> 
381				    
382                 <#if dataNotizia?? && dataNotizia?has_content> 
383				   <#assign someDate = dataNotizia?date.xs> 
384					<p class="subtitle" style="color: dimgray">${someDate?string["dd/MM/yyyy"]}</p>      
385				</#if>     
386 
387 
388				 
389 </div> 
390 
391 
392 
393   <div class="row mt-4" > 
394                            <div class="col-8 text-left"> 
395                                <p class="text-primary exp">Aggiornamento del ${modifydate?string("dd-MM-yyyy")}</p> 
396                            </div> 
397                            <div class="col-4 text-right"> 
398                                <h5><a class="exp btn-link" href="javascript:if(window.print)window.print()"><i class="fa fa-print"></i></a></h5> 
399                            </div> 
400                        </div> 
401 
402<#-- =================== FINE COSTRUZIONE SINGOLA News ======================= --> 
403 
404 
405<#-- FINE --> 
406 
407	 
408 
409 
410 
411 
412 
413	</#list> <#-- FINE LOOP --> 
414	 
415<#-- se l'ultimo indice generato è mod 4 allora vuol dire che il penultimo,quello del ciclo non è multiplo di quattro 
416per cui va chiuso l'ultimo div aperto  -->	 
417<#if idxLoop %4 == 0>  
418</div> 
419</#if> 
420	 
421	 
422	 
423	 
424</#if> 
425<#-- FINE  NEWS LOOP --> 
426 
427   </div> <#-- chiusura div.container --> 
428      </section> 
429 </main> 
430 
431 
432 
433 
434<div id="testDiv"></div> 
435<script> 
436 
437Liferay.Portlet.ready( 
438 
439	/* 
440	This function gets loaded after each and every portlet on the page. 
441 
442	portletId: the current portlet's id 
443	node: the Alloy Node object of the current portlet 
444	*/ 
445 
446	function(portletId, node) { 
447	 
448	//alert('portlet id: ' + portletId + ' node: ' + node); 
449	 
450	} 
451); 
452 
453 
454 
455<style> 
456.portlet-layout{ 
457    display:none!important; 
458} 
459.portlet-header{ 
460    display:none!important; 
461} 
462.giust{ 
463    text-align:justify; 
464} 
465 
466.component-title{ 
467    display:none; 
468} 
469 
470.portlet-asset-publisher .asset-title { 
471display: none !important; 
472} 
473</style>