Commission du cinéma d'art et d'essai du 12 février 2019
Une erreur s'est produite lors du traitement du gabarit.
The following has evaluated to null or missing:
==> categoriesDomainesList[0]  [in template "20116#20152#PUBLICATION" at line 39, column 153]

----
Tip: It's the final [] step 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 articlesMemesSujet = cncArtic...  [in template "20116#20152#PUBLICATION" at line 39, column 9]
----
1<#assign serviceContext = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"].getServiceContext()> 
2<#assign httpServletRequest = serviceContext.getRequest()/> 
3<#assign themeDisplay = serviceContext.getThemeDisplay() /> 
4<#assign cncCategoriesService = serviceLocator.findService("fr.cnc.categories.api.CncCategoriesService") /> 
5<#assign cncTagsService = serviceLocator.findService("fr.cnc.tags.api.CncTagsService") /> 
6<#assign cncUrlService = serviceLocator.findService("fr.cnc.url.api.CncUrlService") /> 
7<#assign journalArticleId = .vars['reserved-article-id'].data> 
8<#assign categoriesDomainesList = cncCategoriesService.recupererCategoriesArticleParVocabulaire(groupId, journalArticleId , "Domaine") /> 
9<#assign categoriesDomainesPrimairesList = cncCategoriesService.recupererCategoriesArticleParVocabulaire(groupId, journalArticleId , "Domaine primaire") /> 
10<#assign tagEntries = cncTagsService.recupererTagsArticle(groupId, journalArticleId) /> 
11<#assign categoriesTypePublicationList = cncCategoriesService.recupererCategoriesArticleParVocabulaire(groupId, journalArticleId , "Type de publication") /> 
12 
13<#-- test si on vient d'une page de liste de contenu --> 
14<#assign siPagePrecedenteCorrespondPageListeContenu = cncUrlService.siPagePrecedenteCorrespondPageListeContenu(httpServletRequest) /> 
15 
16<#if categoriesDomainesList?size != 0 || categoriesDomainesPrimairesList?size != 0> 
17	<#-- recupere le premier element de la liste --> 
18	<#if categoriesDomainesPrimairesList?size != 0> 
19		<#assign categoryList = categoriesDomainesPrimairesList[0]> 
20	<#elseif categoriesDomainesList?size != 0> 
21		<#assign categoryList = categoriesDomainesList[0]> 
22	</#if> 
23 
24	<#-- Calcul de l'url vers la page liste de publication filtrer sur le domaine--> 
25	<#assign urlListePublicationsDomaine = cncUrlService.calculUrlPageListeDomainePublicationsTypeParArticleId(themeDisplay, journalArticleId, categoryList, null) /> 
26	<#assign categoriesSousDomainesList = cncCategoriesService.recupererCategoriesArticleParVocabulaire(groupId, journalArticleId , "Sous-domaine") /> 
27	<#if categoriesTypePublicationList?size != 0> 
28		<#assign type = categoriesTypePublicationList[0]> 
29		<#-- Calcul de l'url vers la page liste de publication filtrer sur le type--> 
30		<#assign urlListePublicationsType = cncUrlService.calculUrlPageListeDomainePublicationsTypeParArticleId(themeDisplay, journalArticleId, categoryList, type) /> 
31	</#if> 
32 
33	<#if categoriesSousDomainesList?size != 0> 
34		<#assign sousDomaineId = categoriesSousDomainesList[0].getCategoryId() /> 
35	<#else> 
36		<#assign sousDomaineId = 0 /> 
37	</#if> 
38	<#assign cncArticleRechercheService = serviceLocator.findService("fr.cnc.recherche.api.CncArticleRechercheService") /> 
39	<#assign articlesMemesSujet = cncArticleRechercheService.recupererRenduDerniersArticlesMemeSujet(themeDisplay, journalArticleId, "PUBLICATION", categoriesDomainesList[0].getCategoryId(), sousDomaineId, "PUBLICATION-MEME-SUJET", 2) /> 
40 
41</#if> 
42 
43 
44<#setting locale=locale.toString()> 
45<#setting datetime_format="EEE, d MMM yyyy HH:mm:ss Z"> 
46 
47 
48<#if siPagePrecedenteCorrespondPageListeContenu> 
49	<div class="back"> 
50    <div class="container"> 
51        <div class="row"> 
52            <div class="col"> 
53                <div class="link-icon"> 
54	                    <a href="javascript:boutonRetour.goBack();" > 
55                        <i class="icon icon-back"></i> 
56	                        <@liferay.language key="pages.liste.bouton.retour.a.la.liste" /> 
57                    </a> 
58                </div> 
59            </div> 
60        </div> 
61    </div> 
62	</div> 
63</#if> 
64 
65<div class="single publication"> 
66    <div class="container"> 
67        <article> 
68            <div class="row justify-content-center"> 
69                <div class="col-12 col-lg-10"> 
70                    <div class="article-head"> 
71                        <div class="article-title"> 
72							<#assign journalArticleTitle = .vars['reserved-article-title'].data> 
73							<#if journalArticleTitle?has_content> 
74                            	<h1> 
75		                            ${journalArticleTitle} 
76		                        </h1> 
77		                    </#if> 
78 
79							<#assign Templates_Path = templatesPath /> 
80		                    <#include "${Templates_Path}/BLOC-SHARETHIS"> 
81                        </div> 
82                    </div> 
83                </div> 
84            </div> 
85            <div class="article-content"> 
86                <div class="row"> 
87                    <div class="col-12 col-lg-3"> 
88                        <div class="picture"> 
89                            <#if VisuelPrincipal?has_content && VisuelPrincipal.getData()?has_content && VisuelPrincipal.getData()?length gt 2> 
90                                <#assign altVisuelPrincipalDefaut = VisuelPrincipal.getAttribute("name")?split(".")[0] /> 
91 
92                                <#if VisuelPrincipal.getAttribute("alt")?has_content> 
93                                	<#assign altVisuelPrincipalDefaut = VisuelPrincipal.getAttribute("alt") /> 
94	                            </#if> 
95	                            <img data-fileentryid="${VisuelPrincipal.getAttribute("fileEntryId")}" 
96                                    alt="${altVisuelPrincipalDefaut}" 
97	                                src="${VisuelPrincipal.getData()}&thumb=cncThumb" /> 
98                            </#if> 
99                        </div> 
100                    </div> 
101                    <div class="col-12 col-lg-8"> 
102                        <div class="infos"> 
103                        	<#assign originalLocale = locale> 
104							<#setting locale = localeUtil.getDefault()> 
105                            <#if categoriesDomainesList?size != 0> 
106								<div class="category"> 
107							        <a <#if locale.toString()!="en_US">href="${urlListePublicationsDomaine}"</#if>>${categoryList.getTitle(locale)}</a> 
108								</div> 
109                           	</#if> 
110 
111                           	<#if tagEntries?has_content> 
112	                            <div class="tags"> 
113	                                <div class="title-tag"> 
114	                                	<@liferay.language key="article.texte.tags" /> : 
115	                                </div> 
116	                                <ul class="list-unstyled"> 
117	                                    <#list tagEntries as tagEntry> 
118	                                    	<#assign urlTags = cncUrlService.calculeUrlPageRechercheParTag(themeDisplay, tagEntry.getName()) /> 
119											<li><a <#if locale.toString()!="en_US">href="${urlTags}"</#if> >${tagEntry.getName()}</a></li> 
120										</#list> 
121	                                </ul> 
122	                            </div> 
123                            </#if> 
124 
125                            <ul class="list-unstyled simple"> 
126                                <li> 
127                                    <strong><@liferay.language key="article.publication.type.publication" /></strong> : 
128									<#if categoriesTypePublicationList?size != 0 > 
129										<#list categoriesTypePublicationList as categoryTPList> 
130											<a <#if urlListePublicationsType?has_content && locale.toString()!="en_US">href="${urlListePublicationsType}"</#if>>${categoryTPList.getTitle(locale)}</a> 
131										</#list> 
132									</#if> 
133                                </li> 
134                                <li> 
135                                    <strong><@liferay.language key="article.publication.date" /></strong> : 
136									<#assign date = .vars['reserved-article-display-date'].data> 
137									<#setting time_zone = languageUtil.get(locale, "template-timezone")> 
138									<#assign date = date?datetime("EEE, dd MMM yyyy HH:mm:ss Z")> 
139				                    <#if date?has_content> 
140				                    	<#assign date_value = dateUtil.getDate(date, "dd/MM/yyyy", locale)> 
141										${date_value} 
142				                    </#if> 
143                                </li> 
144                            </ul> 
145                            <#setting locale = originalLocale> 
146                        </div> 
147                        <p> 
148                        	<#if Resume?has_content> 
149                        		${Resume.getData()} 
150                        	</#if> 
151                        </p> 
152                        <p> 
153                        	<#if Contenu?has_content> 
154                        		${Contenu.getData()} 
155                        	</#if> 
156                        </p> 
157                        <div class="link-icon"> 
158                        	<#if FichiersAssocies?has_content && FichiersAssocies.getData()?has_content> 
159                            	<#list FichiersAssocies.getSiblings() as cur_fichiersAssocies> 
160                            	    <#assign counter = 0 > 
161                            	    <#assign uuId = "" > 
162                                    <#list cur_fichiersAssocies.getData()?split("/") as x> 
163                                        <#if counter == 5> 
164                                            <#if x?split("?t")?has_content > 
165                                                <#assign uuId = x?split("?t")[0] > 
166                                            </#if> 
167                                        </#if> 
168                                        <#assign counter = counter+1 > 
169                                    </#list> 
170                                    <#assign fileEntry = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryService")> 
171                                    <#if uuId != ""> 
172                                    	<#assign file = fileEntry.getFileEntryByUuidAndGroupId(uuId,groupId) > 
173                                    </#if> 
174                                    <#if file?has_content && uuId?has_content> 
175 
176                            			<#assign fileExtension = "" /> 
177                                		<#if file.getFileName()?has_content && file.getFileName()?split(".")?size gt 1> 
178                                		    <#assign fileExtension = file.getFileName()?split(".")[1] /> 
179                                		</#if> 
180                                		<#if file.getFileName()?has_content && file.getFileName()?split(".")?size gt 1> 
181                                		    <#assign fileExtension = file.getFileName()?split(".")[1] /> 
182                                		</#if> 
183                                		<#assign fileSize = 0 /> 
184 
185			                            <a href="${cur_fichiersAssocies.getData()}"  class="round" target="_blank"> 
186			                                <i class="icon icon-download"></i> 
187											<#if LibelleDuFichier?has_content && LibelleDuFichier.getData()?has_content> 
188												${LibelleDuFichier.getData()} 
189	                                		<#else> 
190	                                			<@liferay.language key="article.publication.telechargement" /> 
191	                                		</#if> 
192 
193	                                        <#if file.getSize()?has_content> 
194	                                        	<#assign fileSize = file.getSize()/1000 /> 
195		                                        <span class="details"> 
196
197				                                <#if fileExtension?has_content && fileExtension?length gt 0 > 
198				                                   	<span class="extension"> 
199				                                   		${fileExtension?upper_case} 
200				                                   	</span> 
201				                                </#if> 
202				                                   	<span class="weight">${fileSize?int} Ko</span>) 
203				                                </span> 
204			                                </#if> 
205                                       </a> 
206                                    </#if> 
207                                 </#list> 
208                        	</#if> 
209                        </div> 
210                    </div> 
211                </div> 
212            </div> 
213        </article> 
214    </div> 
215    <hr/> 
216    <#if articlesMemesSujet?? && articlesMemesSujet?size != 0> 
217	    <div class="rebound"> 
218		    <div class="container"> 
219	            <div class="related-publications"> 
220	                <div class="row"> 
221	                    <div class="col-12 text-center"> 
222	                        <div class="section-title"><@liferay.language key="article.voir.aussi" /></div> 
223	                    </div> 
224	                </div> 
225	                <div class="row"> 
226	                	<#list articlesMemesSujet as articleMemeSujet> 
227	                        <div class="col-12 col-lg-6"> 
228	                    		${articleMemeSujet} 
229	                		</div> 
230	                	</#list> 
231                    </div> 
232	            </div> 
233	        </div> 
234	    </div> 
235    </#if> 
236</div> 
237 
238<#if InformationComplementaire?has_content> 
239	<div class="footer-text"> 
240	    <div class="container"> 
241	        <div class="row"> 
242	            <div class="col-12"> 
243		        	${InformationComplementaire.getData()} 
244	            </div> 
245	        </div> 
246	    </div> 
247	</div> 
248</#if>