null Genelec Monitoring Is a Consistent Sonic Thread for Grammy-Nominated Producer Mike Knobloch

An error occurred while processing the template.
The following has evaluated to null or missing:
==> mainImage  [in template "20116#20152#251097" at line 62, column 73]

----
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: ${mainImage}  [in template "20116#20152#251097" at line 62, column 71]
----
1<#-- Include common helpers --> 
2<#include "${templatesPath}/379393" /> 
3 
4 
5<#-- Get and format article publish date --> 
6<#assign displayDate = .vars['reserved-article-display-date'].data> 
7 
8<#-- Save the original page locale for later --> 
9<#assign originalLocale = locale> 
10 
11<#-- Set the page locale to the portals default locale --> 
12<#setting locale = localeUtil.getDefault()> 
13 
14<#-- Parse the date to a date object --> 
15<#assign displayDate = displayDate?datetime("EEE, d MMM yyyy HH:mm:ss Z")> 
16 
17<#assign cmsContentService= serviceLocator.findService("com.ch5finland.genelec.cms.service.CMSContentService") > 
18<#assign profileService = serviceLocator.findService("com.ch5finland.genelec.cms.service.ProfileService") > 
19 
20<#assign profile = profileService.getProfile(request) > 
21<#assign journalArticleId = .vars['reserved-article-id'].data> 
22<#assign cmsEntity = cmsContentService.getEntityByArticleId(profile, groupId, journalArticleId) > 
23 
24<#assign cmsContentFormatterService= serviceLocator.findService("com.ch5finland.genelec.cms.service.CMSContentFormatterService") > 
25 
26<#-- Article title --> 
27 
28<#if  cmsEntity.getField(profile, "/entity/fields/title")?has_content> 
29    <#assign title = cmsEntity.getLocalizedField(profile, "/entity/fields/title")> 
30<#else> 
31    <#assign title = .vars['reserved-article-title'].data> 
32</#if> 
33 
34<#if  cmsEntity.getField(profile, "/entity/assets/mainImage")?has_content> 
35    <#assign mainImg = cmsEntity.getLocalizedField(profile, "/entity/assets/mainImage")> 
36    <#if !mainImg.isNull("url")> 
37        <#assign mainImage = mainImg.url> 
38    <#else> 
39        <#assign mainImage = ""> 
40    </#if> 
41    <#if !mainImg.isNull("description")> 
42        <#assign mainImageDescription = localizeField(mainImg.description, profile.getCMSLangCode())> 
43    <#else> 
44       <#assign mainImageDescription = "">  
45    </#if> 
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 
57<@appendHTMLMetas currentURL cmsEntity "article" /> 
58 
59 
60<div class="article-page"> 
61 
62    <div class="article-page-background" style="background-image: url(${mainImage})"></div> 
63 
64    <div class="row"> 
65        <div class="col-12"> 
66            <h1 class="article-heading">${title}</h1> 
67        </div> 
68    </div> 
69 
70    <div class="row"> 
71        <div class="col-12"> 
72            <div class="article-share-buttons"> 
73 
74                <a href="${facebook_share_url}${currentURL}" target="_blank"> 
75                    <span class="fa-stack fa-md">  
76                        <i class="fas fa-circle fa-stack-2x icon-dark"></i>  
77                        <i class="fab fa-facebook-f fa-stack-1x fa-inverse"></i>  
78                    </span> 
79                </a> 
80 
81                <a href="${linkedin_share_url}${currentURL}" target="_blank"> 
82                    <span class="fa-stack fa-md">  
83                        <i class="fas fa-circle fa-stack-2x icon-dark"></i>  
84                        <i class="fab fa-linkedin-in fa-stack-1x fa-inverse"></i>  
85                    </span> 
86                </a> 
87 
88                <a href="mailto:?subject=${title}&amp;body=${title} ${currentURL}" 
89   title="${title}" target="_blank"> 
90                    <span class="fa-stack fa-md">  
91                        <i class="fas fa-circle fa-stack-2x icon-dark"></i>  
92                        <i class="fas fa-envelope fa-stack-1x fa-inverse"></i>  
93                    </span> 
94                </a> 
95                 
96                <a href="${twitter_share_url}${currentURL}" target="_blank"> 
97                    <span class="fa-stack fa-md">  
98                        <i class="fas fa-circle fa-stack-2x icon-dark"></i>  
99                        <i class="fab fa-twitter fa-stack-1x fa-inverse"></i>  
100                    </span> 
101                </a> 
102 
103            </div> 
104            <div class="article-date"> 
105                ${displayDate?string["dd.MM.yyyy"]} 
106            </div> 
107        </div> 
108    </div> 
109 
110    <div class="row article-page-main-image"> 
111        <div class="col-12"> 
112            <img class="article-image" src="${mainImage}?w=1250&fm=jpg" alt="${mainImageDescription}"> 
113        </div> 
114    </div>  
115     
116    <div class="article-section mt-5"> 
117        <div class="row"> 
118            <div class="col-xs-12 col-lg-8 col-xl-9"> 
119                <div class="product-page-intro mt-0"> 
120                    <#if  cmsEntity.getLocalizedField(profile, "/entity/fields/summary")?has_content> 
121                        ${cmsEntity.getLocalizedField(profile, "/entity/fields/summary")} 
122                    </#if> 
123                </div> 
124                <div> 
125                    <#if  cmsEntity.getLocalizedField(profile, "/entity/fields/content")?has_content> 
126                        <#--  ${cmsEntity.getLocalizedField(profile, "/entity/fields/content")}  --> 
127                        ${cmsContentFormatterService.getMarkdown(cmsEntity.getLocalizedField(profile, "/entity/fields/content"), 930)} 
128                    </#if> 
129                </div> 
130 
131                <@imageGallery cmsEntity /> 
132 
133            </div> 
134            <div class="col-xs-12 col-lg-4 col-xl-3"> 
135                 
136                <@printKitList cmsEntity /> 
137 
138                <#if cmsEntity.getField(profile, "/entity/assets/documents")?has_content> 
139                 
140                <h3>Documents</h3> 
141 
142                <ul class="list-unstyled text-bold"> 
143 
144                    <#assign documents = cmsEntity.getField(profile, "/entity/assets/documents")> 
145 
146                    <#list documents.iterator() as document> 
147                        <li><a href="${document.url}">${localizeField(document.title, profile.getCMSLangCode())}</a></li> 
148                    </#list> 
149                     
150                </ul> 
151 
152                </#if> 
153 
154            </div> 
155        </div> 
156    </div>     
157</div> 
158 
159<@showVideos cmsEntity/> 
160 
161<hr> 
162 
163<#assign entity = cmsEntity.getField(profile, "/entity") > 
164<#if !entity.relationships.isNull("products")> 
165    <#assign relatedProducts = cmsEntity.getField(profile, "/entity/relationships/products") > 
166</#if> 
167 
168<#if relatedProducts?has_content> 
169    <div class="article-bottom mt-5"> 
170        <div class="row"> 
171            <h2 class="section-heading col-xs-12 text-bolder">Related Products</h2> 
172        </div> 
173        <div class="row"> 
174            <div class="col-12"> 
175                <div class="relatedProduct-carousel owl-carousel owl-theme"> 
176                <#list relatedProducts.iterator() as relatedProduct> 
177                    <#if !relatedProduct.assets.isNull("scaleImage")> 
178                        <#assign relatedProductImage = relatedProduct.assets.scaleImage.url > 
179                        <#if cmsContentService.getLayoutForEntity(themeDisplay.layout.groupId, relatedProduct.id)?has_content> 
180                            <a href="${cmsContentService.getUrlForEntity(themeDisplay, relatedProduct.id)}"> 
181                        <#else> 
182                            <a> 
183                        </#if> 
184                            <div class="card card-img"> 
185                                <div class="aspect-ratio aspect-ratio-4-to-3"> 
186                                    <@imageThumbnail data="${relatedProductImage}" id="" cssClasses="aspect-ratio-item-fluid aspect-ratio-item-center-middle owl-lazy" thumbnail="relatedProductImg"/> 
187                                </div> 
188                                <div class="card-padding-tight text-dark"> 
189                                    <div class="text-medium text-bolder">${localizeField(relatedProduct.properties.title, profile.getCMSLangCode())}</div> 
190                                </div> 
191                            </div> 
192                        </a> 
193                    <#else> 
194                        <#if cmsContentService.getLayoutForEntity(themeDisplay.layout.groupId, relatedProduct.id)?has_content> 
195                            <a href="${cmsContentService.getUrlForEntity(themeDisplay, relatedProduct.id)}"> 
196                        <#else> 
197                            <a> 
198                        </#if> 
199                            <div class="card card-img"> 
200                                <div class="aspect-ratio aspect-ratio-4-to-3 bg-gray-lighter">   
201                                </div> 
202                                <div class="card-padding-tight text-dark"> 
203                                    <div class="text-medium text-bolder">${localizeField(relatedProduct.properties.title, profile.getCMSLangCode())}</div> 
204                                </div> 
205                            </div> 
206                        </a> 
207                    </#if> 
208                </#list> 
209                </div> 
210            </div> 
211        </div> 
212    </div> 
213</#if> 
214 
215 
216 
217<style> 
218 
219    .card{ 
220        border: 1px solid #CCC; 
221
222     
223    .card-padding-tight { 
224        padding: calc(10 / 16 * 1em); 
225        min-height: 5em; 
226
227 
228    
229    .owl-theme .owl-nav [class*='owl-']:hover { 
230        background: none; 
231        color: #000; 
232
233 
234    .owl-theme .owl-nav .disabled { 
235        opacity: 0; 
236
237 
238    .relatedProduct-carousel img { 
239        /* height defined in imageThumbnail macro */ 
240        width: auto !important; 
241
242 
243    .relatedProduct-carousel .owl-prev { 
244        width: 17px; 
245        height: 100px; 
246        position: absolute; 
247        left: -45px; 
248        top: 55px; 
249        display: block !important; 
250        border:0px solid black; 
251        font-size: 3em !important; 
252
253 
254    .relatedProduct-carousel .owl-next { 
255        width: 17px; 
256        height: 100px; 
257        position: absolute; 
258        right: -45px; 
259        top: 55px; 
260        display: block !important; 
261        border:0px solid black; 
262        font-size: 3em !important; 
263
264 
265</style> 
266 
267<script> 
268$('.relatedProduct-carousel').owlCarousel({ 
269    loop:false, 
270    nav:true, 
271    dots:false, 
272    margin:5, 
273    lazyLoad:true, 
274    navText : ['<i class="icon-angle-left">','<i class="icon-angle-right">'], 
275    responsive:{ 
276        0:{items:1, slideBy:1}, 
277        600:{items:3, slideBy:3}, 
278        1000:{items:6, slideBy:6} 
279    }, 
280}) 
281 
282</script> 
283 
284<@liferay_util["html-top"] outputKey="htmltop" > 
285    <meta property="og:image" content="test" /> 
286</@>