Eventi

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@59f043b8"; 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@59f043b8"; see cause exception in the Java stack trace.

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

Pulsante Notizie Eventi