Mensajes - WWD2023
World Wetlands Day Messages and Statements
Se ha producido un error al procesar la plantilla.
The following has evaluated to null or missing:
==> renderer.getDisplayDate [in template "10157#10197#1137899" at line 47, column 33]
----
Tip: It's the step after the last dot that caused this error, not those before it.
----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----
----
FTL stack trace ("~" means nesting-related):
- Failed at: #assign Date = renderer.getDisplayDate() [in template "10157#10197#1137899" at line 47, column 17]
----
1<#-- ADT - Story List -->
2<#if entries?has_content>
3 <#setting locale = locale.toString() />
4 <#setting datetime_format = "dd MMMM yyyy" />
5 <#assign serviceContext = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"].getServiceContext()>
6 <#assign themeDisplay = serviceContext.getThemeDisplay() />
7 <#assign showFullContent = assetLinkBehavior != "showFullContent" />
8 <#assign cpt=0 />
9 <div class="row">
10 <#list entries as curEntry>
11
12 <#assign renderer = curEntry.getAssetRenderer() />
13 <#assign className = renderer.getClassName() />
14 <#assign userName = stringUtil.split(renderer.getUserName(), ' ') />
15
16 <#if renderer.getArticle()?? && className == "com.liferay.journal.model.JournalArticle" >
17 <#assign journalArticle = renderer.getArticle() />
18
19 <#assign document = saxReaderUtil.read(journalArticle.getContent()) />
20 <#assign rootElement = document.getRootElement() />
21 <#assign resourcePrimKey = journalArticle.getResourcePrimKey()/>
22 <#-- StoryTitle -->
23 <#assign StoryTitle = "" />
24 <#assign xPathSelectorItem = saxReaderUtil.createXPath("dynamic-element[@name='StoryTitle']") >
25 <#if xPathSelectorItem.selectSingleNode(rootElement)?? >
26 <#assign ItemNode = xPathSelectorItem.selectSingleNode(rootElement).selectSingleNode("dynamic-content") >
27 <#assign StoryTitle = ItemNode.getStringValue() >
28 </#if>
29
30 <#-- Text -->
31 <#assign Text = "" />
32 <#assign xPathSelectorItem = saxReaderUtil.createXPath("dynamic-element[@name='Description']") >
33 <#if xPathSelectorItem.selectSingleNode(rootElement)?? >
34 <#assign ItemNode = xPathSelectorItem.selectSingleNode(rootElement).selectSingleNode("dynamic-content") >
35 <#assign Text = ItemNode.getStringValue() >
36 </#if>
37
38 <#-- Image -->
39 <#assign Image = "" />
40 <#assign xPathSelectorItem = saxReaderUtil.createXPath("dynamic-element[@name='Image']") >
41 <#if xPathSelectorItem.selectSingleNode(rootElement)?? >
42 <#assign ItemNode = xPathSelectorItem.selectSingleNode(rootElement).selectSingleNode("dynamic-content") >
43 <#assign Image = ItemNode.getStringValue() >
44 </#if>
45
46 <#-- Date -->
47 <#assign Date = renderer.getDisplayDate() />
48 <#assign xPathSelectorItem = saxReaderUtil.createXPath("dynamic-element[@name='Date']") >
49 <#if xPathSelectorItem.selectSingleNode(rootElement)?? >
50 <#assign ItemNode = xPathSelectorItem.selectSingleNode(rootElement).selectSingleNode("dynamic-content") >
51 <#assign Date = ItemNode.getStringValue() />
52 <#assign Date = dateUtil.parseDate("yyyy-MM-dd", Date, locale) />
53 </#if>
54
55 <#-- View URL -->
56 <#assign viewURL= "${themeDisplay.getScopeGroup().getDisplayURL(themeDisplay)}/story/-/detail/${journalArticle.getUrlTitle()}?redirect=${themeDisplay.getURLCurrent()}"/>
57 <#if cpt != 0 && cpt % 3 == 0>
58 </div>
59 <div class="row">
60 </#if>
61
62 <div class="col-md-4">
63 <div class="block-white">
64 <div class="story-list-block">
65 <#if Image!="" >
66 <figure>
67 <a href="${viewURL}" class="img">
68 <img class="story-list-img" src="${Image}" alt="Image" role="presentation" />
69 <span>${languageUtil.get(locale, "story-list.more")}</span>
70 </a>
71 </figure>
72 </#if>
73 <div class="story-list-content">
74 <h4 class="story-list-title"><a href="${viewURL}">${StoryTitle}</a></h4>
75 <div class="story-list-date"><a href="${viewURL}">${Date?datetime}</a></div>
76 <div class="story-list-description">
77 <a href="${viewURL}">
78 ${stringUtil.shorten(Text,150)}
79
80 <p><strong>${languageUtil.get(locale, "story-list.more")}</strong></p>
81 </a>
82 </div>
83 </div>
84 </div>
85 </div>
86 </div>
87 <#assign cpt = cpt+1 />
88 </#if>
89 </#list>
90 </div>
91</#if>
