The following has evaluated to null or missing: ==> entry.getAssetRenderer() [in template "20101#20128#2260367470" at line 8, column 38] ---- 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 assetRenderer = entry.getAsse... [in template "20101#20128#2260367470" at line 8, column 13] ----
1<#-- file path: klabindw/assets/footer-navigation/adts/social-media/social-media.ftl -->
2
3<#assign dlAppService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppService")>
4
5<#if entries?has_content>
6 <ul class="kdw-footer_social_media">
7 <#list entries as entry>
8 <#assign assetRenderer = entry.getAssetRenderer() />
9 <#assign article = assetRenderer.getArticle() />
10 <#assign ddmStructure = article.getDDMStructure() />
11 <#assign document = saxReaderUtil.read(article.getContent()) />
12 <#assign rootElement = document.getRootElement() />
13
14 <#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='icon']")>
15 <#assign footerIcon = xPathSelector.selectSingleNode(rootElement).getStringValue()?trim>
16
17 <#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='urlRedirect']")>
18 <#assign footerURL = xPathSelector.selectSingleNode(rootElement).getStringValue()?trim>
19
20 <#assign urlImage = "">
21 <#if footerIcon?? && footerIcon!="">
22 <#assign
23 fileJson = jsonFactoryUtil.createJSONObject(footerIcon)
24 fileEntryId = getterUtil.getLong(fileJson.get('fileEntryId'))
25 />
26 <#assign
27 fileEntry = dlAppService.getFileEntry(fileEntryId)
28 urlImage = themeDisplay.getPortalURL() + "/documents/" + fileEntry.groupId + "/" + fileEntry.uuid + "?t=" + .now?string["HHmmssSSS"]?string
29 />
30 </#if>
31
32 <li><a href="${footerURL}"><img style="margin-top: 3px" src="${urlImage}" /></a></li>
33
34 </#list>
35 </ul>
36</#if>