#GenelecMoments Road Show 2019

null #GenelecMoments Road Show 2019

An error occurred while processing the template.
The following has evaluated to null or missing:
==> cmsEntity.getLocalizedField(profile, "/entity/assets/mainImage")  [in template "20116#20152#379608" at line 76, column 24]

----
Tip: If the failing expression is known to be 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 mainImg = cmsEntity.getLocali...  [in template "20116#20152#379608" at line 76, column 5]
----
1<#-- Include common helpers --> 
2<#include "${templatesPath}/379393" /> 
3 
4<#assign t = { 
5    "locationTitle" : "Location" 
6}> 
7 
8<#-- Get and format article publish date --> 
9<#assign displayDate = .vars['reserved-article-display-date'].data> 
10 
11<#-- Save the original page locale for later --> 
12<#assign originalLocale = locale> 
13 
14<#-- Set the page locale to the portals default locale --> 
15<#setting locale = localeUtil.getDefault()> 
16 
17<#-- Parse the date to a date object --> 
18<#assign displayDate = displayDate?datetime("EEE, d MMM yyyy HH:mm:ss Z")> 
19 
20<#assign cmsContentService= serviceLocator.findService("com.ch5finland.genelec.cms.service.CMSContentService") > 
21<#assign profileService = serviceLocator.findService("com.ch5finland.genelec.cms.service.ProfileService") > 
22 
23 
24 
25<#assign 
26	defaultLatitude = -3.6833 
27	defaultLongitude = 40.40 
28	 
29	group = themeDisplay.getScopeGroup() 
30 
31	googleMapsAPIKey = group.getLiveParentTypeSettingsProperty("googleMapsAPIKey")!""	 
32
33 
34<#assign profile = profileService.getProfile(request) > 
35<#assign journalArticleId = .vars['reserved-article-id'].data> 
36<#assign cmsEntity = cmsContentService.getEntityByArticleId(profile, groupId, journalArticleId) > 
37 
38<#assign cmsContentFormatterService= serviceLocator.findService("com.ch5finland.genelec.cms.service.CMSContentFormatterService") > 
39 
40<#-- Article title --> 
41 
42<#if  cmsEntity.getField(profile, "/entity/fields/title")?has_content> 
43    <#assign title = cmsEntity.getLocalizedField(profile, "/entity/fields/title")> 
44<#else> 
45    <#assign title = .vars['reserved-article-title'].data> 
46</#if> 
47 
48<#--  Complete URL  --> 
49<#assign portalUrl = themeDisplay.getPortalURL() > 
50<#assign urlTitle = themeDisplay.getURLCurrent() > 
51<#assign currentURL = portalUrl + urlTitle > 
52 
53<#assign facebook_share_url = themeDisplay.getThemeSetting("facebook_share_url") > 
54<#assign linkedin_share_url = themeDisplay.getThemeSetting("linkedin_share_url") > 
55<#assign twitter_share_url = themeDisplay.getThemeSetting("twitter_share_url") > 
56<#assign whatsapp_share_url = themeDisplay.getThemeSetting("whatsapp_share_url") > 
57 
58 
59 
60 
61<#if  cmsEntity.getField(profile, "/entity/assets/mobileMainImage")?has_content> 
62    <#assign mobileMainImg = cmsEntity.getLocalizedField(profile, "/entity/assets/mobileMainImage")> 
63    <#if !mobileMainImg.isNull("url")> 
64        <#assign mobileMainImage = mobileMainImg.url> 
65    <#else> 
66        <#assign mobileMainImage = ""> 
67    </#if> 
68    <#if !mobileMainImg.isNull("description")> 
69        <#assign mobileMainImageDescription = localizeField(mobileMainImg.description, profile.getCMSLangCode())> 
70    <#else> 
71       <#assign mobileMainImageDescription = "">  
72    </#if> 
73</#if> 
74 
75<#if  cmsEntity.getField(profile, "/entity/assets/mainImage")?has_content> 
76    <#assign mainImg = cmsEntity.getLocalizedField(profile, "/entity/assets/mainImage")> 
77    <#if !mainImg.isNull("url")> 
78        <#assign mainImage = mainImg.url> 
79    <#else> 
80        <#assign mainImage = ""> 
81    </#if> 
82    <#if !mainImg.isNull("description")> 
83        <#assign mainImageDescription = localizeField(mainImg.description, profile.getCMSLangCode())> 
84    <#else> 
85       <#assign mainImageDescription = "">  
86    </#if> 
87</#if> 
88 
89<#assign startDate = "" > 
90<#if cmsEntity.getFieldAsDate("/entity/fields/startDate")?has_content> 
91    <#assign startDate = cmsEntity.getFieldAsDate("/entity/fields/startDate") > 
92</#if> 
93<#assign endDate = "" > 
94<#if cmsEntity.getFieldAsDate("/entity/fields/endDate")?has_content> 
95    <#assign endDate = cmsEntity.getFieldAsDate("/entity/fields/endDate") > 
96</#if> 
97 
98<@appendHTMLMetas currentURL cmsEntity "article" /> 
99 
100<div class="article-page"> 
101 
102    <div class="article-page-background"></div> 
103 
104    <div class="row"> 
105        <div class="col-12"> 
106            <h1 class="article-heading">${title}</h1> 
107                <#if startDate?has_content> 
108                    <h3 class="event-date"> 
109                    <#if !endDate?has_content> 
110                        ${startDate?string("d.M.yyyy")} 
111                    <#elseif startDate?string("d") != endDate?string("d") || startDate?string("M") != endDate?string("M")> 
112                        <#if startDate?string("d") != endDate?string("d") && startDate?string("M") != endDate?string("M")> 
113                            ${startDate?string("d.M.")} - ${endDate?string("d.M.yyyy")} 
114                        <#else> 
115                            ${startDate?string("d.")} - ${endDate?string("d.M.yyyy")} 
116                        </#if> 
117                    <#else> 
118                        ${startDate?string("d.M.yyyy")} 
119                    </#if> 
120                </h3>         
121                </#if>             
122             
123        </div> 
124    </div> 
125 
126    <div class="row"> 
127        <div class="col-12"> 
128            <div class="article-share-buttons"> 
129 
130                <a href="${facebook_share_url}${currentURL}" target="_blank"> 
131                    <span class="fa-stack fa-md">  
132                        <i class="fas fa-circle fa-stack-2x icon-dark"></i>  
133                        <i class="fab fa-facebook-f fa-stack-1x fa-inverse"></i>  
134                    </span> 
135                </a> 
136 
137                <a href="${linkedin_share_url}${currentURL}" target="_blank"> 
138                    <span class="fa-stack fa-md">  
139                        <i class="fas fa-circle fa-stack-2x icon-dark"></i>  
140                        <i class="fab fa-linkedin-in fa-stack-1x fa-inverse"></i>  
141                    </span> 
142                </a> 
143 
144                <a href="mailto:?subject=${title}&amp;body=${title} ${currentURL}" 
145   title="${title}" target="_blank"> 
146                    <span class="fa-stack fa-md">  
147                        <i class="fas fa-circle fa-stack-2x icon-dark"></i>  
148                        <i class="fas fa-envelope fa-stack-1x fa-inverse"></i>  
149                    </span> 
150                </a> 
151                 
152                <a href="${twitter_share_url}${currentURL}" target="_blank"> 
153                    <span class="fa-stack fa-md">  
154                        <i class="fas fa-circle fa-stack-2x icon-dark"></i>  
155                        <i class="fab fa-twitter fa-stack-1x fa-inverse"></i>  
156                    </span> 
157                </a> 
158 
159                <a href="${whatsapp_share_url}${currentURL}" data-action="share/whatsapp/share" target="_blank"> 
160                    <span class="fa-stack fa-md">  
161                    	<i class="fas fa-circle fa-stack-2x icon-dark"></i> 
162                    	<i class="fab fa-whatsapp fa-stack-1x fa-inverse"></i> 
163                    </span> 
164                </a> 
165 
166            </div> 
167            <div class="article-date"> 
168 
169            </div> 
170        </div> 
171    </div> 
172 
173    <div class="row article-page-main-image"> 
174        <div class="col-12"> 
175            <#if mainImage?has_content> 
176                <picture> 
177                    <source srcset="${mainImage}?w=1250&q=80&fm=webp" type="image/webp" /> 
178                    <img class="article-image" src="${mainImage}?w=1250&q=80&fm=jpg" alt="${mainImageDescription}">    
179                </picture> 
180            </#if> 
181        </div> 
182    </div>  
183     
184    <div class="article-section mt-5"> 
185        <div class="row"> 
186            <div class="col-xs-12 col-lg-8 col-xl-9"> 
187                <div class="product-page-intro mt-0"> 
188                    <#if  cmsEntity.getLocalizedField(profile, "/entity/fields/summary")?has_content> 
189                        ${cmsEntity.getLocalizedField(profile, "/entity/fields/summary")} 
190                    </#if> 
191                </div> 
192                <div> 
193                    <#if  cmsEntity.getLocalizedField(profile, "/entity/fields/content")?has_content> 
194                        <#--  ${cmsEntity.getLocalizedField(profile, "/entity/fields/content")}  --> 
195                        ${cmsContentFormatterService.getMarkdown(cmsEntity.getLocalizedField(profile, "/entity/fields/content"), 930)} 
196                    </#if> 
197 
198                    <#--  <#assign summary = cmsContentFormatterService.getMarkdown(cmsEntity.getLocalizedField(profile, "/entity/fields/content"))>  --> 
199 
200 
201                </div> 
202 
203<@showVideos cmsEntity/> 
204 
205            </div> 
206            <div class="col-xs-12 col-lg-4 col-xl-3"> 
207             
208            <#-- ---- Right column ----  --> 
209             
210             
211                <div class="venue"> 
212                    <#if cmsEntity.getLocalizedField(profile, "/entity/fields/venueName")?has_content> 
213                        <h3>${cmsEntity.getLocalizedField(profile, "/entity/fields/venueName")}</h3> 
214                    <#else> 
215                        <h3>${t.locationTitle}</h3> 
216                    </#if> 
217                     
218                <#if  cmsEntity.getLocalizedField(profile, "/entity/fields/streetAddress")?has_content> 
219                    <span class="d-block">${cmsEntity.getLocalizedField(profile, "/entity/fields/streetAddress")}</span> 
220                </#if> 
221                <#if  cmsEntity.getLocalizedField(profile, "/entity/fields/city")?has_content> 
222                    <span class="d-block">${cmsEntity.getLocalizedField(profile, "/entity/fields/city")}</span> 
223                </#if> 
224                <#if  cmsEntity.getLocalizedField(profile, "/entity/fields/country")?has_content> 
225                    <span class="d-block">${cmsEntity.getLocalizedField(profile, "/entity/fields/country")}</span> 
226                </#if> 
227                <#if  cmsEntity.getField(profile, "/entity/fields/url")?has_content> 
228                    <p> 
229                        <a href="${cmsEntity.getField(profile, "/entity/fields/url")}"> 
230                            ${cmsEntity.getField(profile, "/entity/fields/url")} 
231                        </a> 
232                    </p> 
233                </#if>                  
234                </div> 
235                 
236                <#if  cmsEntity.getField(profile, "/entity/fields/coordinates")?has_content> 
237                    <#assign coordStr = cmsEntity.getField(profile, "/entity/fields/coordinates") > 
238                    <#if coordStr?contains(",")> 
239                        <#assign lat = coordStr?split(",")[0]> 
240                        <#assign lng = coordStr?split(",")[1]> 
241                         
242                        <#if lat?has_content && lng?has_content> 
243                        <div id="location-map" style="height: 290px;"> </div> 
244                        <script> 
245                          var map; 
246                          var venueLatLng = {lat: ${lat}, lng: ${lng}}; 
247                          function initMap() { 
248                            map = new google.maps.Map(document.getElementById('location-map'), { 
249                              center: venueLatLng, 
250                              zoom: 11, 
251                              disableDefaultUI: true, 
252                              fullscreenControl: true, 
253                              zoomControl: true 
254                            }); 
255                            var marker = new google.maps.Marker({ 
256                              position: venueLatLng, 
257                              map: map 
258                            }); 
259
260                        </script> 
261                        <script src="//maps.googleapis.com/maps/api/js?key=${googleMapsAPIKey}&callback=initMap" 
262    async defer></script> 
263                        </#if> 
264                    </#if> 
265                </#if> 
266            <#-- //-- Right column ----  --> 
267             
268            </div> 
269        </div> 
270    </div>     
271</div> 
272 
273 
274<style> 
275     
276    .event-date { 
277        padding-left: 23px; 
278
279 
280 
281    @media only screen and (max-width: 992px) { 
282<#if mobileMainImage?has_content> 
283    .article-page-background { 
284        background-image: url(${mobileMainImage}); 
285 
286    }  
287<#else> 
288    .article-page-background { 
289        background-image: url(${mainImage}); 
290 
291    }  
292     
293</#if> 
294
295 
296 
297     @media only screen and (min-width: 992px) { 
298 
299    .article-page-background { 
300        background-image: url(${mainImage}); 
301 
302    }  
303
304 
305 
306</style> 
307 
308<script> 
309$('.relatedProduct-carousel').owlCarousel({ 
310    loop:false, 
311    nav:true, 
312    dots:false, 
313    margin:5, 
314    lazyLoad:true, 
315    navText : ['<i class="icon-angle-left">','<i class="icon-angle-right">'], 
316    responsive:{ 
317        0:{items:1, slideBy:1}, 
318        600:{items:3, slideBy:3}, 
319        1000:{items:6, slideBy:6} 
320    }, 
321}) 
322 
323 
324if ($(window).outerWidth() < 992) { 
325     
326
327 
328</script>