Dati e Pubblicazioni

An error occurred while processing the template.
Java method "com.liferay.portal.kernel.util.DateUtil_IW.parseDate(String, String, Locale)" threw an exception when invoked on com.liferay.portal.kernel.util.DateUtil_IW object "com.liferay.portal.kernel.util.DateUtil_IW@47e9fb44"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign dateNewsObj = dateUtil.parseD...  [in template "20099#20135#629658" at line 24, column 53]
----
1<#--import translate--> 
2    <#include "${templatesPath}/611477" /> 
3    <#assign jsonFactoryServiceUtil=serviceLocator.findService("com.liferay.portal.kernel.json.JSONFactoryUtil") /> 
4    <#assign journalArticleList=[]> 
5        <#if entries?has_content> 
6            <#list entries as curEntry> 
7                <#assign renderer=curEntry.getAssetRenderer()> 
8                    <#assign journalArticle=renderer.getArticle()> 
9                        <#assign document=saxReaderUtil.read(journalArticle.getContentByLocale(locale))> 
10                            <#assign rootElement=document.document.getRootElement()> 
11                                <#assign jsonObjectArticle=jsonFactoryServiceUtil.createJSONObject()> 
12                                    <#assign xPathSelectorTitoloNews=saxReaderUtil.createXPath("dynamic-element 
13                                        [@name='titolo_news' ]")> 
14                                        <#if xPathSelectorTitoloNews.selectSingleNode(rootElement)?has_content> 
15                                            <#assign titolo_news=xPathSelectorTitoloNews.selectSingleNode(rootElement).getStringValue()> 
16                                                <#assign jsonObjectArticle=jsonObjectArticle.put("titoloNews",titolo_news)> 
17                                                    <#else> 
18                                                        <#assign jsonObjectArticle=jsonObjectArticle.put("titoloNews","")> 
19                                        </#if> 
20                                        <#assign xPathSelectorData=saxReaderUtil.createXPath("dynamic-element 
21                                            [@name='data_news' ]")> 
22                                            <#if xPathSelectorData.selectSingleNode(rootElement)?has_content> 
23                                                <#assign data_news=xPathSelectorData.selectSingleNode(rootElement).getStringValue()> 
24                                                    <#assign dateNewsObj=dateUtil.parseDate("yyyy-MM-dd", data_news?trim, locale)> 
25                                                        <#assign jsonObjectArticle=jsonObjectArticle.put("dateNewsObj",dateNewsObj)> 
26                                            </#if> 
27                                            <#assign categories=curEntry.getCategories() /> 
28                                            <#if categories?? && categories?has_content> 
29                                                <#assign categorieEntry=categories[0] /> 
30                                                <#assign jsonObjectArticle=jsonObjectArticle.put("categorieTitle",categorieEntry.getTitle(locale))> 
31                                                    <#else> 
32                                                        <#assign jsonObjectArticle=jsonObjectArticle.put("categorieTitle","")> 
33                                            </#if> 
34                                            <#if categorieEntry?? && categorieEntry?has_content> 
35                                                <#assign imgDefault=categorieEntry.getName()?replace(" "," -")?lower_case /> 
36                                                <#assign imgDefault=imgDefault+".JPG" /> 
37                                                <#else> 
38                                                    <#assign imgDefault="default.JPG" /> 
39                                            </#if> 
40                                            <#assign xPathSelectorImmagine=saxReaderUtil.createXPath("dynamic-element 
41                                                [@name='img_news' ]")> 
42                                                <#assign imgUrl=""> 
43                                                    <#if xPathSelectorImmagine.selectSingleNode(rootElement)?has_content> 
44                                                        <#assign img_news=xPathSelectorImmagine.selectSingleNode(rootElement).getStringValue()> 
45                                                            <#if img_news !="" && validator.isContent(img_news)> 
46                                                                <#assign jsonImmagine=jsonFactoryUtil.createJSONObject(img_news)> 
47                                                                    <#assign groupId=jsonImmagine.getLong("groupId")> 
48                                                                        <#assign uuId=jsonImmagine.getString("uuid")> 
49                                                                            <#assign imgName=jsonImmagine.getString("title")> 
50                                                                                <#assign imgUrl="/documents/" +groupId+"/"+0+"/"+imgName+"/"+uuId /> 
51                                                                                <#assign jsonObjectArticle=jsonObjectArticle.put("imgUrl",imgUrl)> 
52                                                                                    <#else> 
53                                                                                        <#assign imgUrl="/documents/" +themeDisplay.getLayout().getGroupId()+"/"+586348+"/"+imgDefault /> 
54                                                                                        <#assign jsonObjectArticle=jsonObjectArticle.put("imgUrl",imgUrl)> 
55                                                            </#if> 
56                                                    </#if> 
57                                                    <#if curEntry.getSummaryCurrentValue()?? && curEntry.getSummaryCurrentValue()!=""> 
58                                                        <#assign jsonObjectArticle=jsonObjectArticle.put("summaryCurrentValue",curEntry.getSummaryCurrentValue())> 
59                                                            <#else> 
60                                                                <#assign jsonObjectArticle=jsonObjectArticle.put("summaryCurrentValue","")> 
61                                                    </#if> 
62                                                    <#if journalArticle.getUrlTitle()?? && journalArticle.getUrlTitle()!=""> 
63                                                        <#assign jsonObjectArticle=jsonObjectArticle.put("urlDisplayPage",journalArticle.getUrlTitle())> 
64                                                            <#else> 
65                                                                <#assign jsonObjectArticle=jsonObjectArticle.put("urlDisplayPage","")> 
66                                                    </#if> 
67                                                    <#assign journalArticleList=journalArticleList+[jsonObjectArticle]> 
68            </#list> 
69        </#if> 
70        <#if journalArticleList?has_content> 
71            <div class="container"> 
72                <div class="p-sm-0"> 
73                    <div class="row"> 
74                        <div class="col-md-12 mb-4"> 
75                            <#list (journalArticleList?sort_by("dateNewsObj"))?reverse as journalArticle> 
76                                <#assign dateRelatedArticle=dateUtil.getDate(journalArticle.get("dateNewsObj"), "dd.MM.yy" , locale) /> 
77                                <div class="row card-news mb-4 mb-lg-5 b-line2"> 
78                                    <div class="col-12 col-lg-6"> 
79                                        <div class="mb-2"> <img alt='immagine ${journalArticle.get("titoloNews")}' src="${journalArticle.get('imgUrl')}" class="img100hp w-100"></div> 
80                                    </div> 
81                                    <div class="col-12 col-lg-6"> 
82                                        <#if journalArticle.get("categorieTitle")!=""> 
83                                            <p class="text-primary text-14p text-spacing font-weight-bold mb-2"><span class="category uppercase"> 
84                                                    ${journalArticle.get("categorieTitle")} 
85                                                </span> &mdash; ${dateRelatedArticle} 
86                                            </p> 
87                                            <#else> 
88                                                <p class="text-primary text-14p text-spacing font-weight-bold mb-2"> 
89                                                    ${dateRelatedArticle} 
90                                                </p> 
91                                        </#if> 
92                                        <p class="text-28p line-h40p font-weight-600 mb-2"> 
93                                            ${journalArticle.get("titoloNews")} 
94                                        </p> 
95                                        <p class="text-chambray font-lora line-h24p mb-4"> 
96                                            ${journalArticle.get("summaryCurrentValue")} 
97                                        </p> 
98                                        <div class="mt-auto pl-1 pl-sm-2 pb-4"> 
99                                            <a href="-/${journalArticle.get('urlDisplayPage')}" class="text-14p font-weight-bold" "${translate(locale, 'Leggi di più')}"> 
100                                                ${translate(locale, "Leggi di più")} 
101                                                <span aria-hidden="true">&rarr;</span> 
102                                                <span class="sr-only"> 
103                                                    Riguardo ${journalArticle.get("titoloNews")} 
104                                                </span> 
105                                            </a> 
106                                        </div> 
107                                    </div> 
108                                </div> 
109                            </#list> 
110                        </div> 
111                    </div> 
112                </div> 
113            </div> 
114        </#if> 

Asset Publisher

An error occurred while processing the template.
Java method "com.liferay.portal.kernel.util.DateUtil_IW.parseDate(String, String, Locale)" threw an exception when invoked on com.liferay.portal.kernel.util.DateUtil_IW object "com.liferay.portal.kernel.util.DateUtil_IW@47e9fb44"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign dateNewsObj = dateUtil.parseD...  [in template "20099#20135#623511" at line 26, column 49]
----
1<#include "${templatesPath}/611477" /> 
2<#assign jsonFactoryServiceUtil = serviceLocator.findService("com.liferay.portal.kernel.json.JSONFactoryUtil") />  
3<#assign journalArticleList=[]> 
4<#if entries?has_content> 
5 
6  	<div class="container"> 
7					<div class="p-4 px-sm-0"> 
8						<div class="row"> 
9	<#list entries as curEntry> 
10        <#assign renderer = curEntry.getAssetRenderer() > 
11		<#assign journalArticle = renderer.getArticle() > 
12	    <#assign document = saxReaderUtil.read(journalArticle.getContentByLocale(locale))  > 
13	    <#assign rootElement = document.document.getRootElement()  > 
14	    <#assign createDate = dateUtil.getDate(curEntry.createDate, "dd/MM/yyyy", locale)  > 
15		<#assign jsonObjectArticle=jsonFactoryServiceUtil.createJSONObject()> 
16		 
17	    <#assign xPathSelectorTitoloNews = saxReaderUtil.createXPath("dynamic-element[@name='titolo_news']")  >	 
18		<#if xPathSelectorTitoloNews.selectSingleNode(rootElement)?has_content> 
19			<#assign titolo_news = xPathSelectorTitoloNews.selectSingleNode(rootElement).getStringValue()  > 
20			<#assign jsonObjectArticle=	jsonObjectArticle.put("titolo_news",titolo_news)> 
21		</#if> 
22		 
23		<#assign xPathSelectorData= saxReaderUtil.createXPath("dynamic-element[@name='data_news']")  >	 
24					<#if xPathSelectorData.selectSingleNode(rootElement)?has_content> 
25						<#assign data_news = xPathSelectorData.selectSingleNode(rootElement).getStringValue()  > 
26						<#assign dateNewsObj = dateUtil.parseDate("yyyy-MM-dd", data_news?trim, locale)> 
27						<#assign dateRelatedArticle= dateUtil.getDate(dateNewsObj, "dd.MM.yy", locale) /> 
28						<#assign jsonObjectArticle=	jsonObjectArticle.put("dateRelatedArticle",dateRelatedArticle)> 
29					</#if> 
30		 
31		 
32		<#assign xPathSelectorCorpo= saxReaderUtil.createXPath("dynamic-element[@name='corpo']")  >	 
33		<#if xPathSelectorCorpo.selectSingleNode(rootElement)?has_content> 
34			<#assign corpo = xPathSelectorCorpo.selectSingleNode(rootElement).getStringValue()  > 
35			<#assign jsonObjectArticle=	jsonObjectArticle.put("corpo",corpo)> 
36		</#if> 
37		 
38		<#assign journalArticleList=journalArticleList+[jsonObjectArticle]> 
39		 
40		<#assign categories=curEntry.getCategories()/> 
41	 
42		<#if (curEntry?index)%3==0> 
43			<#assign classDivPrincipale="col-12 col-md-4 my-4 b-line"/> 
44		<#else>	 
45			<#assign classDivPrincipale="col-12 col-md-4 my-4 b-line b-left"/> 
46		</#if> 
47	 
48							<div class="${classDivPrincipale}"> 
49								<div class="card card-news h-100"> 
50									<div class="card-body pl-1 pr-2 py-0 flex flex-column"> 
51										<#if categories?? && categories?has_content> 
52											<#assign categorieEntry=categories[0] /> 
53											<p class="text-primary text-14p text-spacing font-weight-bold mb-2"><span class="category uppercase"> ${categorieEntry.getTitle(locale)}</span> &mdash; ${dateRelatedArticle}</p> 
54										<#else>	 
55											<p class="text-primary text-14p text-spacing font-weight-bold mb-2">${dateRelatedArticle}</p> 
56										</#if> 
57											 
58											<p class="text-28p line-h40p font-weight-600 mb-2">${titolo_news}</p> 
59											<p class="text-chambray font-lora mb-4">${curEntry.getSummaryCurrentValue()} </p> 
60											 
61									</div> 
62									<div class="mt-auto pl-1 pl-sm-2 pb-4"> 
63											<a href="-/${journalArticle.getUrlTitle()}" class="text-14p font-weight-bold""${translate(locale, 'Leggi di più')}"> 
64												${translate(locale, "Leggi di più")} 
65												<span aria-hidden="true">&rarr;</span> 
66												<span class="sr-only"> 
67													Riguardo ${titolo_news} 
68												</span> 
69											</a> 
70									</div>  
71								</div> 
72							</div> 
73			 
74    </#list> 
75			</div> 
76				 
77		</div> 
78    </div> 
79</#if> 

Pulsante Notizie Dati e pubblicazioni