TOPICS
An error occurred while processing the template.
The following has evaluated to null or missing:
==> listCategoryId[0]!someDefault  [in template "20116#20152#131932837" at line 15, column 31]

----
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 categoryId = listCategoryId[0...  [in template "20116#20152#131932837" at line 15, column 9]
----
1<#if entries?has_content> 
2<div class="publication_content"> 
3	<#assign  
4			detailLinkJournalArticleService= serviceLocator.findService("mnp.detail.link.generator.journalarticle.DetailLinkJournalArticleService") 
5	/> 
6	<#assign categoryProperty = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryPropertyLocalService") /> 
7	 
8	<#assign friendlyUrl = layout.getFriendlyURL() /> 
9	<#assign  
10		service= serviceLocator.findService("service.service.UtilLocalService")  
11		base32Service= serviceLocator.findService("mnp.custom.service.base32.Base32Service") 
12	/> 
13	<#assign friendlyUrlEncode = base32Service.encodeBase32(friendlyUrl) /> 
14	<#assign listCategoryId = service.getCategoryByFriendlyUrlAsLocal(friendlyUrlEncode) /> 
15	<#assign categoryId = listCategoryId[0]!someDefault> 
16	<#assign listCategoryProperty = categoryProperty.getCategoryProperties(categoryId) /> 
17	<#assign value = "" /> 
18	<#list listCategoryProperty as categoryProperty> 
19		<#if categoryProperty.getKey() == "viewAllDocument" > 
20			<#assign value = base32Service.decodeBase32(categoryProperty.getValue())> 
21		</#if> 
22	</#list> 
23	<#list entries as curEntry> 
24		 
25		<#assign rootElement = saxReaderUtil.read(curEntry.getAssetRenderer().getArticle().getContentByLocale(locale)).getRootElement() 
26				 title = curEntry.getTitle(locale) 
27				 viewInContext = !(assetLinkBehavior = "showFullContent") 
28				 viewURL = detailLinkJournalArticleService.getDetailLink(renderRequest, renderResponse, 
29					curEntry ,viewInContext,themeDisplay) 
30				 PublicationDate="" 
31				 Author="" 
32				 Page="" 
33				 externalURL ="" 
34				 uploadBook ="" 
35				 bookType = "" 
36		/> 
37		<#assign assetRenderer = curEntry.getAssetRenderer() /> 
38		<#list rootElement.elements() as dynamicElement> 
39			<#if "Author" == dynamicElement.attributeValue("name") > 
40				<#assign Author = dynamicElement.element("dynamic-content").getData()> 
41			</#if> 
42			<#if "PublicationDate" == dynamicElement.attributeValue("name") > 
43				<#assign PublicationDate_Data = dynamicElement.element("dynamic-content").getData()> 
44				<#if validator.isNotNull(PublicationDate_Data)> 
45					<#assign  
46							PublicationDate_DateObj = dateUtil.parseDate("yyyy-MM-dd", PublicationDate_Data, locale) 
47							PublicationDate = dateUtil.getDate(PublicationDate_DateObj, "dd-MM-yyyy", locale) 
48							/> 
49				</#if> 
50			</#if> 
51			<#if "Page" == dynamicElement.attributeValue("name") > 
52				<#assign Page = dynamicElement.element("dynamic-content").getData()> 
53			</#if> 
54			<#if "Language" == dynamicElement.attributeValue("name") > 
55				<#assign Language = dynamicElement.element("dynamic-content").getData()> 
56			</#if> 
57			<#if "SmallImage" == dynamicElement.attributeValue("name") > 
58				<#assign  
59				imageContent = dynamicElement.element("dynamic-content") 
60				SmallImage = dynamicElement.element("dynamic-content").getData()> 
61			</#if> 
62			<#if "bookType" == dynamicElement.attributeValue("name")> 
63				<#assign bookType = dynamicElement.element("dynamic-content").getData()> 
64			</#if> 
65			<#if "externalURL" == dynamicElement.attributeValue("name")> 
66				<#assign externalURL = dynamicElement.element("dynamic-content").getData()> 
67			</#if> 
68			<#if "uploadBook" == dynamicElement.attributeValue("name")> 
69				<#assign uploadBook = dynamicElement.element("dynamic-content").getData()> 
70			</#if> 
71		</#list> 
72		<#assign  
73			value1 ='["value 1"]' 
74			value2 ='["value 2"]' 
75		/>  
76		<ul class="marginbottom3percent"> 
77          <li class="marginbottom3percent890"> 
78            <ul> 
79              <li> 
80				<#assign dlAppServiceUtil = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppService") />  
81				<#assign  
82					fileEntryIdNumber = imageContent.attributeValue("fileEntryId") 
83				/> 
84				<#if fileEntryIdNumber?? && fileEntryIdNumber?has_content> 
85					<#assign  
86						fileEntryIdNumber = imageContent.attributeValue("fileEntryId")?number 
87					/> 
88					<#attempt> 
89						<@adaptive_media_image["img"] fileVersion=dlAppServiceUtil.getFileEntry(fileEntryIdNumber).getFileVersion()/>  
90					<#recover> 
91						<img src="${SmallImage}"> 
92					</#attempt> 
93				<#else> 
94					<img src="${SmallImage}"> 
95				</#if> 
96              </li> 
97              <li> 
98                <h2 class="bigheight">${title}</h2> 
99                <hr/> 
100                <ul style="display: block;"> 
101                  <li><span class="lightfontweight">Author&nbsp;:</span>${Author}</li> 
102                  <li><span class="lightfontweight">Publication Date&nbsp;:</span> ${PublicationDate}</li> 
103                  <li><span class="lightfontweight">Page&nbsp;:</span>${Page}</li> 
104                  <li><span class="lightfontweight">Language&nbsp;:</span> ${Language}</li> 
105                  <#if (bookType == value1)> 
106				  <li><a href="${externalURL}" class="btn goldbg midtopmargin">${themeDisplay.translate("mnp-resource-button-download")}</a></li> 
107				  <#elseif (bookType == value2)> 
108				  <li><a href="${uploadBook}" class="btn goldbg midtopmargin">${themeDisplay.translate("mnp-resource-button-download")}</a></li> 
109				  </#if> 
110         
111                </ul> 
112              </li> 
113            </ul> 
114          </li> 
115        </ul> 
116	</#list> 
117	</div> 
118<a  href="${value}" class="btn goldbg midtopmargin">${themeDisplay.translate("mnp-explore-more")}</a> 
119<#else> 
120    <h1>${themeDisplay.translate("mnp-no-data-available")}</h1> 
121</#if>