Eventi - ANPAL
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@5d461b41"; 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> — ${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">→</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>