L'association d'assurés, partenaire d'AXA

Actualités

Retrouvez toutes les actualités AGIPI

Sélectionnez les actualités concernant

Une erreur s'est produite lors du traitement du gabarit.
The following has evaluated to null or missing:
==> renderer.getArticle  [in template "20116#20152#652699" at line 9, column 35]

----
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 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 journalArticle = renderer.get...  [in template "20116#20152#652699" at line 9, column 9]
----
1<#assign languageId = localeUtil.toLanguageId(request.getLocale())> 
2<#assign xPathImage = saxReaderUtil.createXPath("dynamic-element[@name='Image']")> 
3<#assign assetVocabLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService" )> 
4<#assign assetCategoryPropLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryPropertyLocalService")> 
5<#assign VOC_NAME="NEWS_TYPES"> 
6<div class="list-actu-cards"> 
7    <#list entries as entry> 
8        <#assign renderer = entry.getAssetRenderer()> 
9        <#assign journalArticle = renderer.getArticle()> 
10        <#assign articleId = journalArticle.getArticleId()> 
11        <#assign articleUrlTitle = journalArticle.getUrlTitle()> 
12        <#assign document = saxReaderUtil.read(journalArticle.getContentByLocale(languageId))> 
13        <#assign rootElement = document.getRootElement()> 
14        <#if xPathImage?? && xPathImage.selectSingleNode(rootElement)??> 
15            <#assign imageUrl = xPathImage.selectSingleNode(rootElement).getStringValue()> 
16        </#if> 
17        <#assign bgColor = "blue"> 
18        <#assign newsTypeValue = ""> 
19        <#list entry.categories as currentCategory> 
20            <#if currentCategory.isRootCategory()> 
21                <#assign parentVoc = assetVocabLocalService.getAssetVocabulary(currentCategory.getVocabularyId())> 
22                <#if VOC_NAME==parentVoc.getName()> 
23                    <#assign newsTypeValue = currentCategory.getTitle(locale)> 
24                    <#assign colorProp = assetCategoryPropLocalService.getCategoryProperty(currentCategory.getCategoryId(), "color")> 
25                    <#assign bgColor = colorProp.getValue()> 
26                </#if> 
27            </#if> 
28        </#list> 
29        <div class="article-thumbnail card ${bgColor}" data-article-url-title="${articleUrlTitle}"> 
30            <#if imageUrl??> 
31                <div class="picture top" style="background-image:url(${stringUtil.trim(imageUrl)});"></div> 
32            </#if> 
33            <div class="content"> 
34                <#if newsTypeValue?has_content> 
35                    <div class="category">${newsTypeValue}</div> 
36                </#if> 
37                <#assign dateFormat = "dd MMMM yyyy" /> 
38                <div class="date">${dateUtil.getDate(entry.getPublishDate(), dateFormat, locale)}</div> 
39                <div class="title"> 
40                    <a href="/actualites-details/${articleUrlTitle}"> 
41                        ${journalArticle.getTitle(languageId)} 
42                    </a> 
43                </div> 
44            </div> 
45        </div> 
46    </#list> 
47</div>