An error occurred while processing the template.
Java method "jdk.proxy148.$Proxy984.getLatestArticle(long)" threw an exception when invoked on jdk.proxy148.$Proxy984 object "com.liferay.journal.service.impl.JournalArticleLocalServiceImpl@6bd6b8c4"; see cause exception in the Java stack trace. ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign article = journalArticleLocal... [in template "11099719610328#20119#127276" at line 10, column 7] ----
1<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")>
2<#assign StructureLocalService = serviceLocator.findService("com.liferay.dynamic.data.mapping.service.DDMStructureLocalService")>
3
4<#if entries?has_content>
5 <h3>
6 <@liferay.language key="results-found"/> ${searchContainer.getTotal()}
7 </h3>
8
9 <#list entries as entry>
10 <#assign article = journalArticleLocalService.getLatestArticle(entry.classPK?number) />
11 <#assign structure = StructureLocalService.getStructure(article.getDDMStructure().getPrimaryKey()) />
12 <#assign structureName = structure.getName() />
13
14 <div class="dl-card card-white">
15 <div class="card-body px-0">
16 <#if structureName?contains("News")>
17 ${articleService.getContentByClassPK(entry.classPK?number, "128840")}
18 <#elseif structureName?contains("Information board")>
19 ${articleService.getContentByClassPK(entry.classPK?number, "128867")}
20 <#elseif structureName?contains("Publication")>
21 ${articleService.getContentByClassPK(entry.classPK?number, "556301")}
22 <#elseif structureName?contains("Statistics Methodology")>
23 ${articleService.getContentByClassPK(entry.classPK?number, "3322535")}
24 <#elseif structureName?contains("Data")>
25 ${articleService.getContentByClassPK(entry.classPK?number, "128862")}
26 </#if>
27 </div>
28 </div>
29 </#list>
30<#else>
31 <h2>
32 <@liferay.language key="no-results-found" />
33 </h2>
34</#if>