Bilatzailea Skolae

Errorea gertatu da txantiloia prozesatzerakoan.
The following has evaluated to null or missing:
==> assetCategoryLocalService.getAssetEntryAssetCategories  [in template "209613#209652#5377767" at line 62, column 88]

----
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 articleCats = assetCategoryLo...  [in template "209613#209652#5377767" at line 62, column 65]
----
1<#assign journalArticleService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")> 
2<#assign assetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")> 
3<#if entries?has_content> 
4			<#list entries as curEntry> 
5				<#if curEntry.getAssetRenderer().getClassName() == "com.liferay.journal.model.JournalArticle"> 
6					<#assign article = journalArticleService.getLatestArticle(getterUtil.getLong(curEntry.getClassPK())) /> 
7					<#assign rootElement = saxReaderUtil.read(article.getContentByLocale(locale)).getRootElement() /> 
8					<#assign selectorImage = saxReaderUtil.createXPath("dynamic-element[@name='image']") /> 
9					<#assign image = "${themeDisplay.getPathThemeImages()}/images-default-contents.jpg" /> 
10					<#assign alt = "" /> 
11					<#if selectorImage.selectSingleNode(rootElement)?has_content> 
12						<#assign rawImage = selectorImage.selectSingleNode(rootElement).getStringValue()?trim /> 
13						<#if rawImage != "" && rawImage != "{}"> 
14							<#assign imageJSON = rawImage?eval /> 
15							<#if imageJSON?has_content && imageJSON.groupId?has_content && imageJSON.fileEntryId?has_content && imageJSON.name?has_content && imageJSON.uuid?has_content> 
16								<#assign image = "/documents/${imageJSON.groupId}/${imageJSON.fileEntryId}/${imageJSON.name}/${imageJSON.uuid}" /> 
17							</#if> 
18							<#if imageJSON.alt?has_content> 
19								<#assign alt = imageJSON.alt /> 
20							</#if> 
21						</#if> 
22					</#if> 
23					<#assign selectorContent = saxReaderUtil.createXPath("dynamic-element[@name='content']") /> 
24					 
25					<#assign viewURL = portalUtil.getLayoutFriendlyURL(layout, themeDisplay, themeDisplay.getLocale())?replace(layout.getFriendlyURL(themeDisplay.getLocale()), "/-/"+article.getUrlTitle(themeDisplay.getLocale())) /> 
26					 
27					<#assign autor = rootElement.valueOf("//dynamic-element[@name='autor']/dynamic-content/text()") /> 
28					<#assign position = rootElement.valueOf("//dynamic-element[@name='position']/dynamic-content/text()") /> 
29					<#assign subTitle = rootElement.valueOf("//dynamic-element[@name='subTitle']/dynamic-content/text()") /> 
30					 
31					<#assign centro = rootElement.valueOf("//dynamic-element[@name='centro']/dynamic-content/text()") /> 
32					<#assign responsables = rootElement.valueOf("//dynamic-element[@name='responsables']/dynamic-content/text()") /> 
33					<div class="search-results__item"  id="search-results__item-${curEntry?index}"> 
34						<a class="skolae-card skolae-card--large" href="${viewURL}"> 
35							<div class="skolae-card__text-wrapper"> 
36								<h3 class="skolae-card__text-wrapper__title title-blue-small">${article.getTitle(locale)}</h3> 
37                                <#if subtitle?has_content> 
38                                    <h4 class="skolae-card__text-wrapper__subtitle">${subtitle}</h4> 
39                                </#if> 
40                                <#if article.getDescription()?has_content && !autor?has_content && !position?has_content && !centro?has_content || !responsables?has_content> 
41                                <div class="skolae-card__text-wrapper__paragraph text-trucante text-trucante--5">${article.getDescription()}</div> 
42                                 </#if> 
43								<#if autor?has_content> 
44								<h4 class="skolae-card__text-wrapper__subtitle">${autor}</h4> 
45								</#if> 
46								<#if position?has_content> 
47							    	<p class="skolae-card__text-wrapper__paragraph text-trucante text-trucante--2 gray-neutral-color">${position}</p> 
48								<#elseif centro?has_content || responsables?has_content> 
49								    	<p class="skolae-card__text-wrapper__paragraph text-trucante text-trucante--2 gray-neutral-color">${responsables} | ${centro}</p> 
50								</#if> 
51							</div> 
52								<#if image == ""> 
53									<div class="skolae-card__image-empty"></div> 
54								<#else> 
55									<div class="skolae-card__image"> 
56										<#if alt == ""> 
57											<#assign alt = article.getTitle(locale) /> 
58										</#if>  
59										<img src="${image}" alt="${alt}" /> 
60									</div> 
61								</#if> 
62								<#assign articleCats = assetCategoryLocalService.getAssetEntryAssetCategories(curEntry.getEntryId()) /> 
63    								<div class="tags"> 
64    								     <#list articleCats as cat> 
65                                           <div class="tags__item">${cat.getTitle(locale)}</div> 
66                                        </#list> 
67    								</div> 
68						</a> 
69					</div> 
70				</#if> 
71			</#list> 
72	</#if> 
Erakutsi gehiago
49ko 3 elementu erakusten