Blog

Resta sempre aggiornato sulle novità e gli eventi del settore! 

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

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign backgroundFileEntry = portlet...  [in template "20157#20197#4138892" at line 86, column 89]
----
1<#if entries?has_content> 
2	<div class="container"> 
3		<div class="row"> 
4			<div class="col-xs-12 offset-xs-0 col-lg-10 offset-lg-1"> 
5				<section class="mb-7x mb-md-9x"> 
6					<div> 
7						<#assign index = 0 />  
8					    <#list entries as curEntry> 
9							<#if index == 0> 
10								<#assign renderer = curEntry.getAssetRenderer() /> 
11								<#assign className = renderer.getClassName() /> 
12								<#if className == "com.liferay.journal.model.JournalArticle"> 
13									<#assign journalArticle = renderer.getArticle() /> 
14									<#assign date = journalArticle.getModifiedDate()?string('dd MMM yyyy') /> 
15									<#assign document = saxReaderUtil.read(journalArticle.getContent()) /> 
16									<#assign rootElement = document.getRootElement() /> 
17									<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='News']/dynamic-content[@language-id = '${locale}']") /> 
18									<#assign news = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 
19									<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='Description']/dynamic-content[@language-id = '${locale}']") /> 
20									<#assign description = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 
21									<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='Image']/dynamic-content[@language-id = '${locale}']") /> 
22									<#assign image = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 
23									<#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, curEntry) /> 
24									<#assign viewURL = curEntry.getAssetRenderer().getURLViewInContext(renderRequest, renderResponse, viewURL) /> 
25								</#if> 
26								<div class="AF-Card AF-CardNews AF-CardNews-large"> 
27									<div class="AF-CardNews_image AF-CardNews_image-large"> 
28									    
29										<#assign backgroundMapJson = image?eval /> 
30										<#assign backgroundGroupId = backgroundMapJson.groupId?number /> 
31										<#assign backgroundUUID = backgroundMapJson.uuid /> 
32										<#assign portletFileRepositoryUtil = serviceLocator.findService("com.liferay.portal.kernel.portletfilerepository.PortletFileRepositoryUtil") /> 
33										<#assign backgroundFileEntry = portletFileRepositoryUtil.getPortletFileEntry(backgroundUUID, backgroundGroupId) /> 
34										<#assign backgroundFileEntryURL = portletFileRepositoryUtil.getDownloadPortletFileEntryURL(themeDisplay, backgroundFileEntry, "") /> 
35										<img class="fit-cover" src="${backgroundFileEntryURL}" alt="img-news" /> 
36									</div> 
37									<div class="AF-CardNews_text-large"> 
38										<label>${date}</label> 
39										<h4 class="AF-CardNews_title"> ${news}</h4> 
40										<div class="AF-Card_troncate">${description}</div> 
41										<div> 
42											<a class="AF-Btn AF-Btn-outline-primary AF-CardNews_button" href="${viewURL}"> 
43												<span class="AF-Btn_label AF-Btn_label-link">${languageUtil.get(request,"multilingua.adt2019_NEWSGRID.vai.news")}</span> 
44												<svg id="arrow-red-right" xmlns="http://www.w3.org/2000/svg" fill="red"> 
45													<use xlink:href="#icon-arrow-red-right"></use> 
46												</svg> 
47											</a> 
48										</div> 
49										<div></div> 
50									</div> 
51								</div> 
52							</#if> 
53							<#break> 
54						</#list> 
55					</div>	 
56				</section> 
57				 
58				<section class="mb-9x mb-md-3x"> 
59					<div class="row"> 
60						<#assign index=0 />  
61						<#list entries as curEntry>  
62							<#if index != 0> 
63								<#assign renderer = curEntry.getAssetRenderer() /> 
64								<#assign className = renderer.getClassName() /> 
65								<#if className == "com.liferay.journal.model.JournalArticle"> 
66									<#assign journalArticle = renderer.getArticle() /> 
67									<#assign date = journalArticle.getModifiedDate()?string('dd MMMM yyyy') /> 
68									<#assign document = saxReaderUtil.read(journalArticle.getContent()) /> 
69									<#assign rootElement = document.getRootElement() /> 
70									<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='News']/dynamic-content[@language-id = '${locale}']") /> 
71									<#assign news = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 
72									<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='Description']/dynamic-content[@language-id = '${locale}']") /> 
73									<#assign description = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 
74										<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='Image']/dynamic-content[@language-id = '${locale}']") /> 
75									<#assign image = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 
76									<#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, curEntry) /> 
77									<#assign viewURL = curEntry.getAssetRenderer().getURLViewInContext(renderRequest, renderResponse, viewURL) /> 
78								</#if> 
79								<div class="mb-7x mb-md-9x col-md-6 col-xl-4"> 
80						    		<div class="AF-Card AF-CardNews"> 
81						        		<div class="AF-CardNews_image  AF-CardNews_image-medium"> 
82											<#assign backgroundMapJson = image?eval /> 
83											<#assign backgroundGroupId = backgroundMapJson.groupId?number /> 
84											<#assign backgroundUUID = backgroundMapJson.uuid /> 
85											<#assign portletFileRepositoryUtil = serviceLocator.findService("com.liferay.portal.kernel.portletfilerepository.PortletFileRepositoryUtil") /> 
86											<#assign backgroundFileEntry = portletFileRepositoryUtil.getPortletFileEntry(backgroundUUID, backgroundGroupId) /> 
87											<#assign backgroundFileEntryURL = portletFileRepositoryUtil.getDownloadPortletFileEntryURL(themeDisplay, backgroundFileEntry, "") /> 
88											<img class="fit-cover" src="${backgroundFileEntryURL}" alt="img-news" /> 
89								        </div> 
90						        		<label>${date}</label> 
91						       			<h4 class="AF-CardNews_title">${news}</h4> 
92						        		<div class="AF-Card_troncate">${description}</div> 
93						        		<a class="AF-Btn AF-Btn-outline-primary AF-CardNews_button" href="${viewURL}"> 
94						        			<span class="AF-Btn_label AF-Btn_label-link">${languageUtil.get(request,"multilingua.adt2019_NEWSGRID.vai.news.lower")}</span> 
95					            			<svg id="arrow-red-right" xmlns="http://www.w3.org/2000/svg" fill="red"> 
96					                			<use xlink:href="#icon-arrow-red-right"></use> 
97					            			</svg> 
98						        		</a> 
99						   		 	</div> 
100								</div> 
101							</#if> 
102							<#assign index=index+ 1> 
103						</#list> 
104					</div> 
105				</section> 
106			</div> 
107		</div>	 
108	</div> 
109</#if>