Aisance Aquatique

Une erreur s'est produite en traitant le calibre.
Error on line 19, column 1 in 10154#10192#9513334
assetVocabularyLocalService.getGroupVocabulary(themeDisplay.scopeGroupId,'Communes') is undefined.
It cannot be assigned to vocab
1<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetEntryLocalService") /> 
2<#assign assetCategoryLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetCategoryLocalService") /> 
3<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.portlet.journal.service.JournalArticleLocalService") /> 
4<#assign typeJournalArticle = "com.liferay.portlet.journal.model.JournalArticle" /> 
5<#assign assetVocabularyLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetVocabularyLocalService") /> 
6<#assign orderByComparatorFactoryUtil = staticUtil["com.liferay.portal.kernel.util.OrderByComparatorFactoryUtil"] /> 
7 
8<#assign serviceContextThreadLocal = staticUtil["com.liferay.portal.service.ServiceContextThreadLocal"] /> 
9<#assign themeDisplay = serviceContextThreadLocal.getServiceContext().getThemeDisplay() /> 
10 
11<#assign communeVocabId = 0/> 
12<#assign themeVocabId = 0/> 
13<#assign themeCategories = []/> 
14<#assign communeCategories = []/> 
15 
16<#assign journalArticle = journalArticleLocalService.getArticle(groupId, .vars['reserved-article-id'].data) /> 
17<#assign entry = assetEntryLocalService.getEntry(typeJournalArticle, journalArticle.getResourcePrimKey()) /> 
18 
19<#assign vocab = assetVocabularyLocalService.getGroupVocabulary(themeDisplay.scopeGroupId,'Communes')/> 
20<#assign communeVocabId = vocab.vocabularyId /> 
21 
22<#assign vocab = assetVocabularyLocalService.getGroupVocabulary(themeDisplay.scopeGroupId,'Thème article (agenda et actus)')/> 
23<#assign themeVocabId = vocab.vocabularyId /> 
24 
25<#assign nbCommunesCategories = assetCategoryLocalService.getVocabularyRootCategoriesCount(communeVocabId)/> 
26<#assign orderByComparator = orderByComparatorFactoryUtil.create('AssetCategory',["name", true]) /> 
27<#assign allCommunesCategories = assetCategoryLocalService.getVocabularyRootCategories(communeVocabId,0,nbCommunesCategories,orderByComparator)/> 
28 
29<#assign nbThemesCategories = assetCategoryLocalService.getVocabularyRootCategoriesCount(themeVocabId)/> 
30<#assign allThemesCategories = assetCategoryLocalService.getVocabularyRootCategories(themeVocabId,0,nbThemesCategories,orderByComparator)/> 
31 
32<#assign dateStart = .vars['date-start'].data /> 
33<#assign date_start = dateUtil.newDate(getterUtil.getLong(dateStart)) /> 
34<#assign date_start_norm = date_start?string['yyyyMMdd'] /> 
35 
36<#assign dateEnd = .vars['date-end'].data /> 
37<#assign date_end = dateUtil.newDate(getterUtil.getLong(dateEnd)) /> 
38<#assign date_end_norm = date_end?string['yyyyMMdd'] /> 
39 
40<#assign categories = assetCategoryLocalService.getCategories(entry.getClassName(), entry.getClassPK()) /> 
41 
42<#assign place_cities = '' /> 
43<#assign place_cities_complement = '' /> 
44<#assign communeCategories = [] /> 
45<#assign themeCategories = [] /> 
46 
47<#list categories as cat> 
48    <#if cat.vocabularyId == communeVocabId > 
49        <#assign communeCategories = communeCategories + [cat] /> 
50        <#assign place_cities = cat.name + " " + place_cities /> 
51    <#elseif cat.vocabularyId == themeVocabId > 
52        <#assign themeCategories = themeCategories + [cat] /> 
53    </#if> 
54</#list> 
55 
56<#if communeCategories?size == 1> 
57    <#assign place_city = communeCategories[0] /> 
58    <#assign place_cities = communeCategories[0].name /> 
59<#elseif communeCategories?size &gt; 1> 
60    <#assign place_city = communeCategories[0] /> 
61    <#assign place_cities_complement = "(+ " + (communeCategories?size - 1) + ' autre' /> 
62    <#if (communeCategories?size - 1) &gt; 1> 
63        <#assign place_cities_complement = place_cities_complement + 's' /> 
64    </#if> 
65    <#assign place_cities_complement = place_cities_complement + ')' /> 
66</#if> 
67     
68<#assign category = "Divers" /> 
69<#list themeCategories as cat> 
70    <#if cat.titleCurrentValue != "actualites"> 
71        <#assign category = cat.titleCurrentValue /> 
72        <#break> 
73    </#if> 
74</#list> 
75 
76<#assign accroche = Accroche.data /> 
77<#assign description = main_content.data /> 
78<#assign place_name = place_name.data /> 
79<#assign place_address = place_address.data /> 
80<#assign contact_tel = contact_tel.data /> 
81<#assign contact_mail = contact_mail.data /> 
82<#assign internet_site = internet_site.data /> 
83<#if prog.data??> 
84    <#assign prog = prog.data /> 
85<#else> 
86    <#assign prog = '' /> 
87</#if> 
88 
89<#assign twoDatesClass = "" /> 
90<#if date_start?string['yyyyMMMdd'] != date_end?string['yyyyMMMdd']> 
91    <#assign twoDatesClass = "two-dates" /> 
92</#if> 
93 
94<#assign articleTitle = journalArticleLocalService.getLatestArticle(entry.getClassPK()).getUrlTitle() /> 
95 
96<div id="page-wrapper"> 
97 
98    <div class="useful-content"> 
99 
100        <div class="news-list news-list-agenda"> 
101 
102            <article class="news-list-news-container" id="news-list-news-container-0" data-selected="true" data-start="${date_start_norm}" data-end="${date_end_norm}" data-place="${place_cities}" data-theme="${category}"> 
103 
104                <a id="news-list-agenda-link-0" class="inner-link news-list-agenda-link news-list-agenda-link-expanded" data-morecontent="news-list-agenda-moreContent-0"  data-urltitle="${articleTitle}" tabindex="0"> 
105                     
106                    <div class="news-list-agenda-prog"> 
107                        <div class="news-list-agenda-progContent ${twoDatesClass}"> 
108                         
109                            <#if place_city??> 
110                            <p class="news-list-agenda-city">${place_city.name} ${place_cities_complement}</p> 
111                            </#if> 
112                             
113                            <#if date_start?string['yyyyMMMdd'] == date_end?string['yyyyMMMdd'] > 
114                                <p class="news-list-agenda-date"> 
115                                    <span class="news-list-agenda-day">${date_start?string['dd']}</span><br /> 
116                                    <span class="news-list-agenda-month">${date_start?string['MMM']}<span class="news-list-agenda-year"> ${date_start?string['yyyy']}</span></span> 
117                                </p> 
118                            <#else> 
119                                <p class="news-list-agenda-date"> 
120                                    <span class="news-list-agenda-day">${date_start?string['dd']}</span><br /> 
121                                    <span class="news-list-agenda-month">${date_start?string['MMM']}<span class="news-list-agenda-year"> ${date_start?string['yyyy']}</span></span> 
122                                </p> 
123                                <p class="news-list-agenda-date"> 
124                                    <span class="news-list-agenda-day">${date_end?string['dd']}</span><br /> 
125                                    <span class="news-list-agenda-month">${date_end?string['MMM']}<span class="news-list-agenda-year"> ${date_end?string['yyyy']}</span></span> 
126                                </p> 
127                            </#if> 
128                             
129                        </div> 
130                    </div> 
131                     
132                    <div class="news-list-news-block"> 
133                        <p class="news-list-news-date"><span class="news-list-news-theme">${category}</span></p> 
134                        <h2 class="news-list-news-title">${.vars['reserved-article-title'].data}</h2> 
135                        <p class="news-list-news-description block-text-ellipsis">${accroche}</p> 
136                    </div> 
137                     
138                </a> 
139                 
140                <div class="news-list-agenda-moreContent news-list-agenda-moreContent-displayed" id="news-list-agenda-moreContent-0"> 
141                     
142                    <ul class="interior-article-footer-items-list agenda-export event-export"> 
143                        <li class="interior-article-footer-item interior-article-print"><button type="button" class="inner-link" title="Imprimer">Imprimer</button></li> 
144                        <li class="interior-article-footer-item interior-article-mail"><button type="button" class="inner-link" title="Partager par mail">Partager par mail</button></li> 
145                        <li class="interior-article-footer-item interior-article-twitter"><button type="button" class="inner-link" title="Partager sur Twitter">Partager sur Twitter</button></li> 
146                        <li class="interior-article-footer-item interior-article-facebook"><button type="button" class="inner-link" title="Partager sur Facebook">Partager sur Facebook</button></li> 
147                    </ul> 
148                     
149                    <p class="news-list-agenda-description">${description}</p> 
150                    <div class="news-list-agenda-aside"> 
151                        <div class="news-list-agenda-aside-block"> 
152                            <p class="news-list-agenda-aside-title">Lieu de l'évènement</p> 
153                            <p class="news-list-agenda-aside-content"> 
154                                <#if place_name != ""> 
155                                    ${place_name}<br /> 
156                                </#if> 
157                                ${place_address}<br /> 
158                                <#if place_city??> 
159                                ${place_city.name} ${place_cities_complement} 
160                                </#if> 
161                            </p> 
162                        </div> 
163                        <div class="news-list-agenda-aside-block"> 
164                            <div> 
165                                <p class="news-list-agenda-aside-title">En savoir plus</p> 
166                                <#if prog != ""> 
167                                    <p class="news-list-agenda-aside-link"><a class="inner-link link-pdf" href="${prog}" title="Afficher le programme">Afficher le programme</a></p> 
168                                </#if> 
169                            </div> 
170                            <p class="news-list-agenda-aside-content"> 
171                                <#if contact_tel != ""> 
172                                    ${contact_tel}<br /> 
173                                </#if> 
174                                <#if contact_mail != ""> 
175                                    <span class="news-list-agenda-mail">${contact_mail}</span><br /> 
176                                </#if> 
177                                <#if internet_site != ""> 
178                                    <#assign wh = websiteHost(internet_site) /> 
179                                    <a class="news-list-agenda-aside-url" href="${internet_site}" target="_blank" rel='noopener noreferrer'>${wh}</a> 
180                                </#if> 
181                            </p> 
182                        </div> 
183                    </div> 
184                     
185                </div> 
186                 
187            </article> 
188 
189        </div> 
190 
191    </div> 
192 
193</div> 
194 
195<#function websiteHost url > 
196    <#assign hostStart = url?index_of("//") /> 
197    <#if hostStart == -1> 
198        <#assign hostStart = -2 /> 
199    </#if> 
200    <#assign hostEnd = url?index_of("/",10) /> 
201    <#if hostEnd == -1> 
202        <#assign hostEnd = url?length /> 
203    </#if> 
204    <#return url[hostStart+2..hostEnd-1] /> 
205</#function>