Breadcrumb

Our stories

Connecting experts and enthusiasts, dreamers and doers, innovators and influencers — explore and experience.

Explore our stories

Asset Publisher

An error occurred while processing the template.
The following has evaluated to null or missing:
==> articleImageAsJson.groupId  [in template "20097#20123#1472470" at line 48, column 101]

----
Tip: It's the step after the last dot that caused this error, not those before it.
----
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 fileEntry = DLAppLocalService...  [in template "20097#20123#1472470" at line 47, column 21]
----
1<#-- 
2Widget templates can be used to modify the look of a 
3specific application. 
4 
5Please use the left panel to quickly add commonly used variables. 
6Autocomplete is also available and can be invoked by typing "${". 
7--> 
8<#assign JSONFactoryUtil = staticUtil["com.liferay.portal.kernel.json.JSONFactoryUtil"] /> 
9<#assign DLAppLocalServiceUtil = staticUtil["com.liferay.document.library.kernel.service.DLAppLocalServiceUtil"]> 
10<#assign DLUtil = staticUtil["com.liferay.document.library.kernel.util.DLUtil"] /> 
11 
12<#if !entries?has_content> 
13	<#if !themeDisplay.isSignedIn()> 
14		${renderRequest.setAttribute("PORTLET_CONFIGURATOR_VISIBILITY", true)} 
15	</#if> 
16 
17	<div class="alert alert-info"> 
18		<@liferay_ui["message"] key="there-are-no-results" /> 
19	</div> 
20</#if> 
21 
22<#if entries?has_content> 
23    <div id="stories-container"> 
24        <#list entries as curEntry> 
25            <#assign assetRenderer = curEntry.getAssetRenderer() /> 
26            <#assign  
27                viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, assetRenderer, curEntry, !stringUtil.equals(assetLinkBehavior, "showFullContent")) 
28                fields =  assetRenderer.getDDMFormValuesReader().getDDMFormValues().getDDMFormFieldValues()  
29                journalArticle = assetRenderer.getAssetObject() 
30                className = assetRenderer.getClassName() 
31                listingTitle = "" 
32                listingSubtitle = "" 
33                listingImage = "" 
34            /> 
35 
36            <#list fields as field> 
37                <#if field.getName() == "listingTitle"> 
38                    <#assign listingTitle = field.getValue().getString(locale) /> 
39                </#if> 
40 
41                <#if field.getName() == "listingSubtitle"> 
42                    <#assign listingSubtitle = field.getValue().getString(locale) /> 
43                </#if> 
44                 
45                <#if field.getName() == "listingImage"> 
46                    <#assign articleImageAsJson = jsonFactoryUtil.createJSONObject(field.getValue().getString(locale)) /> 
47                    <#assign fileEntry =  
48                        DLAppLocalServiceUtil.getFileEntryByUuidAndGroupId(articleImageAsJson.uuid, articleImageAsJson.groupId?number)  
49                    /> 
50                    <#assign listingImage = DLUtil.getDownloadURL(fileEntry, fileEntry.getLatestFileVersion(true), themeDisplay, "") /> 
51                </#if> 
52            </#list> 
53            <div class="story card""> 
54                <a href="${viewURL}"> 
55                    <img class="card-img-top" src="${listingImage}" alt="${articleImageAsJson.alt}"> 
56                    <div class="card-body"> 
57                        <p class="subtitle card-text"> 
58                            ${listingSubtitle} 
59                        </p> 
60 
61                        <h3 class="title card-title"> 
62                            ${listingTitle} <i class="bap-right bap-icon"></i> 
63                        </h3> 
64                    </div> 
65                </a> 
66            </div> 
67        </#list> 
68    </div> 
69</#if>