Entête de page

Agrégateur de contenus

Une erreur s'est produite lors du traitement du gabarit.
The following has evaluated to null or missing:
==> entry.getSources()[0]  [in template "20116#20160#339562" at line 14, column 95]

----
Tip: It's the final [] step 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 entryURL = assetPublisherTemp...  [in template "20116#20160#339562" at line 14, column 9]
----
1<!-- Liste de vignettes oeuvres et contenus webs --> 
2<#setting locale = locale /> 
3<#if !themeDisplay.scopeGroup.publicLayoutSet.virtualHostname?has_content || themeDisplay.scopeGroup.isStagingGroup()> 
4   <#assign homeURL = "/web${layout.group.friendlyURL}/" /> 
5<#else> 
6   <#assign homeURL = "/" /> 
7</#if> 
8<div class="search-asset-portlet"> 
9  <div class="search-asset-results"> 
10    <#list entries as curEntry> 
11      <#if curEntry.getAssetRenderer().getClassName() == 'eu.strasbourg.service.artwork.model.Artwork'> 
12        <#assign entry = curEntry.getAssetRenderer().getArtwork() /> 
13        <#assign assetPublisherTemplateHelperService = serviceLocator.findService("eu.strasbourg.utils.api.AssetPublisherTemplateHelperService")/> 
14        <#assign entryURL = assetPublisherTemplateHelperService.createRenderUrlMusee("oeuvre",entry.getSources()[0].getTitle(locale)) /> 
15        <#assign detailURL = homeURL + entryURL + "/-/entity/id/" + entry.artworkId /> 
16 
17        <!-- Oeuvre : ${entry.getTitle(locale)} --> 
18        <div class="entity-thumbnail artwork-thumbnail ${entry.getSourceCSSClass()}"> 
19          <div class="entity-thumbnail-image"> 
20            <a href="${detailURL}"> 
21              <img src="${entry.getImageURL()}" /> 
22            </a> 
23          </div> 
24          <div class="entity-thumbnail-info"> 
25            <#if entry.getSources()?has_content> 
26              <div class="entity-thumbnail-source"> 
27                  ${entry.getSources()[0].getTitle(locale)} 
28              </div> 
29            </#if> 
30            <#if entry.getArtworkCollections()?has_content> 
31              <div class="entity-thumbnail-parent-title"> 
32                <#list entry.getArtworkCollections() as collection> 
33                  ${collection.getTitle(locale)}&nbsp; 
34                </#list> 
35              </div> 
36            </#if> 
37            <div class="entity-thumbnail-title"> 
38              <a href="${detailURL}"> 
39                <h4>${entry.getTitle(locale)}</h4> 
40              </a> 
41            </div> 
42          </div> 
43        </div> 
44      <#else> 
45        <#assign docXml = saxReaderUtil.read(curEntry.getAssetRenderer().getArticle().getContentByLocale(locale)) /> 
46        <#assign title = docXml.valueOf("//dynamic-element[@name='title']/dynamic-content/text()") /> 
47        <#assign image = docXml.valueOf("//dynamic-element[@name='image']/dynamic-content/text()") /> 
48        <#assign assetPublisherTemplateHelperService = serviceLocator.findService("eu.strasbourg.utils.api.AssetPublisherTemplateHelperService")/> 
49        <#assign imageURL ="" /> 
50        <#if image?has_content> 
51            <#assign imageURL = assetPublisherTemplateHelperService.getDocumentUrl(image) /> 
52        </#if> 
53        <#assign currentURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, curEntry) /> 
54        <#assign viewURL = curEntry.getAssetRenderer().getURLViewInContext(renderRequest, renderResponse, currentURL) /> 
55        <div class="entity-thumbnail"> 
56          <div class="entity-thumbnail-image"> 
57            <a href="${viewURL}"> 
58              <img src="${imageURL}"> 
59            </a> 
60          </div> 
61          <div class="entity-thumbnail-info"> 
62            <div class="entity-thumbnail-title"> 
63              <a href="${viewURL}"> 
64                <h4>${title}</h4> 
65              </a> 
66            </div> 
67          </div> 
68        </div> 
69      </#if> 
70    </#list> 
71  </div> 
72</div>