Takaisin Maatilojen talouskoulutus webinaari / MegaBoosti

Virhe tapahtui prosessoidessa esitysmallia.
The following has evaluated to null or missing:
==> startDateFormatted  [in template "20116#20152#199854" at line 76, column 88]

----
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: #if endDateFormatted?? && endDateForm...  [in template "20116#20152#199854" at line 76, column 41]
----
1<#-- Tapahtuma --> 
2<#assign exclusiveMode = themeDisplay.getPortletDisplay().isStateExclusive() > 
3 
4<#import "${templatesPath}/43867" as ch5> 
5 
6<#assign eventTargetGroup = ch5.getCategories("", "tapahtuman kohderyhmä")?map(cat -> cat.getName())?join(",")> 
7<#assign isMembersOnly = eventTargetGroup?contains("Vain jäsenille")> 
8 
9<#assign membersOnly = extra.getSiblings()!""> 
10<#assign eventType = ch5.getCategories("", "läsnäolo")?first!"" > 
11<#assign contactPersons = contactPerson.getSiblings()!""> 
12 
13<#if (videoFieldSet.sourceFieldSet.youtubeURL.getData())??> 
14	<#assign youtubeURL = videoFieldSet.sourceFieldSet.youtubeURL.getData() > 
15</#if> 
16 
17<#if (videoFieldSet.videoCaption.getData())??> 
18	<#assign videoCaption = videoFieldSet.videoCaption.getData()> 
19</#if> 
20 
21<#-- handle event start and event end dates / times  --> 
22<#if start.startDate?has_content> 
23	<#assign startDate_Data = getterUtil.getString(start.startDate.getData())> 
24	<#if validator.isNotNull(startDate_Data)> 
25		<#assign startDate_DateObj = dateUtil.parseDate("yyyy-MM-dd", startDate_Data, locale)> 
26		<#assign startDateFormatted = dateUtil.getDate(startDate_DateObj, "d.M.yyyy", locale) > 
27	</#if> 
28</#if> 
29 
30<#if start.KellonaikaHhMm?has_content && start.KellonaikaHhMm.getData()?has_content> 
31	<#assign startTime = start.KellonaikaHhMm.getData() > 
32</#if> 
33 
34<#if end.endDate.getData()?has_content> 
35	<#assign endDate_Data = getterUtil.getString(end.endDate.getData())> 
36	<#if validator.isNotNull(endDate_Data)> 
37		<#assign endDate_DateObj = dateUtil.parseDate("yyyy-MM-dd", endDate_Data, locale)> 
38		<#assign endDateFormatted = dateUtil.getDate(endDate_DateObj, "d.M.yyyy", locale) > 
39	</#if> 
40</#if> 
41 
42<#if end.endTime.getData()?has_content && end.endTime.getData()?has_content> 
43	<#assign endTime = end.endTime.getData() > 
44</#if> 
45 
46<#if eventType?has_content> 
47	<#assign eventType = eventType.getName() > 
48</#if> 
49 
50<#assign dlAppServiceUtil = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppService") /> 
51 
52<#assign GroupLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService")> 
53<#assign mtkpaagroup = GroupLocalService.fetchGroup(groupId) > 
54 
55<#-------------------------------- 
56    OUTPUT 
57---------------------------------> 
58 
59<#if exclusiveMode > 
60	<@ch5.exclusiveModeScripts /> 
61</#if> 
62 
63<div class="container <#if exclusiveMode >exclusive-mode</#if>"> 
64	<h1 class="event-title">${.vars['reserved-article-title'].data}</h1> 
65	<div class="event-dates"> 
66		<p> 
67			<#if startDateFormatted?? || startTime??> 
68				<span class="eventStart"> 
69					<#if startDateFormatted??>${startDateFormatted}</#if> 
70					<#if startTime??> klo ${startTime}</#if> 
71				</span> 
72			</#if> 
73			<#if endDateFormatted?? || endTime??> 
74				<span class="date-separator"> - </span> 
75				<span class="eventEnd"> 
76					<#if endDateFormatted?? && endDateFormatted != startDateFormatted>${endDateFormatted}</#if> 
77					<#if endTime??><#if endDateFormatted?? && endDateFormatted != startDateFormatted>klo</#if> ${endTime}</#if> 
78				</span> 
79			</#if> 
80		</p> 
81	</div> 
82 
83	<#if isMembersOnly> 
84		<div class="members-only-info"> 
85			<span class="fas fa-star h2"></span> 
86			<span>Tapahtuma on vain jäsenille</span> 
87		</div> 
88	</#if> 
89 
90	 
91	<#if .vars['reserved-article-description'].data?has_content> 
92		<div class="article-intro"> 
93			${.vars['reserved-article-description'].data} 
94		</div> 
95	</#if> 
96	<div class="event-image"> 
97		<#if youtubeURL?? && youtubeURL != ""> 
98                ${ch5.getVideoEmbed(youtubeURL, videoCaption)} 
99                <#-- set og image if paakuva exists --> 
100                <#if paakuva.getData()?? && paakuva.getData() != ""> 
101                    <@ch5.setOgImage paakuva /> 
102                </#if> 
103		<#elseif paakuva.getData()?? && paakuva.getData() != ""> 
104			<@ch5.getadatiivinemediaimage paakuva /> 
105		</#if> 
106	</div> 
107	<div class="event-description"> 
108		${TapahtumanKuvaus.getData()} 
109	</div> 
110	 
111	<@printEventFieldStr eventType "Osallistuminen" "event-type" /> 
112	 
113	<@printEventField location.address "Sijainti" "address" /> 
114	 
115	<@printEventField LipunHinta "Tapahtuman lipun hinta" "event-price" false "€" /> 
116	 
117	<@printEventField TapahtumanVerkkosivut "Tapahtuman verkkosivu" "webpage" true/> 
118	 
119	<#-- <@printEventField Kenelle "Tapahtuma suunnattu" "target-audience" /> --> 
120	<#if eventTargetGroup?has_content> 
121		<@printEventFieldStr eventTargetGroup "Tapahtuma suunnattu" "target-audience" /> 
122	</#if> 
123	 
124	<#if location.Koordinaatit.getData()?has_content> 
125		<p> 
126			<a target="_blank" href="https://www.google.fi/maps/place/${location.Koordinaatit.getData()?replace(" ","")}/@${location.Koordinaatit.getData()},13z" >Näytä kartalla</a> 
127		</p> 
128	</#if> 
129	 
130	<#assign attachments = (attachment.getSiblings())!""> 
131	<#if attachments?has_content> 
132		<@ch5.listAttachments attachments /> 
133		<br/> 
134	</#if> 
135	 
136	<@ch5.memberInfo membersOnly /> 
137	 
138	<#if contactPersons?has_content> 
139        <div class="mt-3"> 
140            <#list contactPersons as contactPerson> 
141                <@ch5.getWebContentHTML contactPerson /> 
142            </#list> 
143        </div> 
144	</#if> 
145</div> 
146 
147<#macro printEventField field label cssClass link=false unit=""> 
148<#if field?? && field.getData()?? && field.getData()?has_content> 
149    <@printEventFieldStr field.getData() label cssClass link unit /> 
150</#if> 
151</#macro> 
152 
153<#macro printEventFieldStr value label cssClass link=false unit=""> 
154<#if value?? && value?has_content> 
155	<div class="event-field ${cssClass} mb-3"> 
156			<h3>${label}</h3> 
157			<#if !link?? || !link> 
158				<span>${value}<#if unit?has_content> ${unit}</#if></span> 
159			<#else> 
160				<a href="<#if !value?starts_with("http")>https://</#if>${value?trim}">${value}</a> 
161			</#if> 
162	</div> 
163</#if> 
164</#macro> 
165 
166<#assign GroupLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService")> 
167<#assign mtkpaagroup = GroupLocalService.fetchGroup(groupId) > 
168<#assign url = "https://${ch5.getVirtualHostForGroup(mtkpaagroup)}/-/${.vars['reserved-article-url-title'].data}"> 
169<#assign title = "${.vars['reserved-article-title'].data}" > 
170 
171<#if .vars['reserved-article-description'].data?has_content> 
172    <#assign summary = .vars['reserved-article-description'].data > 
173<#else> 
174    <#assign summary = "${TapahtumanKuvaus.getData()?replace('<[^>]+>','','r')?replace('\n','')?truncate(256)?html}" > 
175</#if> 
176 
177<@ch5.getogptags title summary url />