angle-left Estatu Batuetako bihotza bereganatu du Euskadik
Errorea gertatu da txantiloia prozesatzerakoan.
The following has evaluated to null or missing:
==> parts[5]  [in template "842907#842945#21916" at line 409, column 20]

----
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 parts = parts[5]?split("?")  [in template "842907#842945#21916" in function "getFileEntry" at line 409, column 3]
	- Reached through: #assign fileEntry = getFileEntry(curS...  [in template "842907#842945#21916" at line 161, column 41]
----
1<!-- SERVICES --> 
2<#assign assetHelperLocalService = serviceLocator.findService("net.bizkaia.bipo.core.utils.service.AssetHelperLocalService")> 
3<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")> 
4<#assign assetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") > 
5<#assign fileEntryService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService") > 
6<#assign structureLocalService = serviceLocator.findService("com.liferay.dynamic.data.mapping.service.DDMStructureLocalService")> 
7<#assign classNameLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.ClassNameLocalService")> 
8 
9<#assign urlEncoder = staticUtil["java.net.URLEncoder"]> 
10<#assign textFormatter = staticUtil["com.liferay.portal.kernel.util.TextFormatter"]> 
11 
12<#assign assetUtil = staticUtil["com.liferay.portlet.asset.util.AssetUtil"]> 
13<#assign serviceContext = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"].getServiceContext()> 
14 
15<!-- VARIABLES --> 
16<#assign httpServletRequest = serviceContext.getRequest()> 
17 
18<#-- pruebas hay que borrar la siguiente linea  
19${assetHelperLocalService.printSearchContext(httpServletRequest)}--> 
20 
21<#assign articleId = .vars['reserved-article-id'].data >  
22<#assign articleTitle = .vars['reserved-article-title'].data > 
23<#assign journalArticle = journalArticleLocalService.getArticle(articleGroupId, articleId) > 
24<#assign articlePK = journalArticle.getResourcePrimKey() > 
25<#assign journalArticleClassName = "com.liferay.journal.model.JournalArticle"> 
26<#assign classNameId = classNameLocalService.getClassNameId(journalArticleClassName)> 
27<#assign vocabularyTopicsId = propsUtil.get("bipo.vocabulary.topics")> 
28 
29<#if request?has_content> 
30    <#assign portletNamespace = request["theme-display"]["portlet-display"]["id"] + "_" > 
31    <#assign completeCurrentUrl = urlEncoder.encode((request["attributes"]["CURRENT_COMPLETE_URL"])?string?split("?")[0]?string, "UTF-8")> 
32    <#assign pathThemeImages = request['theme-display']['path-theme-images']> 
33<#else> 
34    <#assign portletNamespace = articleId + '_'> 
35    <#assign completeCurrentUrl = 'http://web.bizkaia.eus'> 
36    <#assign pathThemeImages = '/bipo-bizkaia-eus-theme/images'> 
37</#if> 
38 
39 
40<#assign encodedTitle = urlEncoder.encode(articleTitle, "UTF-8")> 
41 
42<#assign structure = structureLocalService.getStructure(company.groupId, classNameId, journalArticle.structureId) > 
43 
44<#assign categories = assetCategoryLocalService.getCategories(journalArticleClassName, articlePK) /> 
45         
46<#assign categoryNames = []> 
47<#assign categoryIds = []> 
48<#list categories as category> 
49    <#if validator.equals(category.vocabularyId?string,vocabularyTopicsId?string)> 
50    <#assign categoryNames = categoryNames + [ "${category.getTitle(locale)}" ] /> 
51    <#assign categoryIds = categoryIds + [ category.categoryId ] /> 
52  </#if> 
53</#list> 
54 
55<script src="${httpUtil.getProtocol(completeCurrentUrl)}://connect.facebook.net/${locale}/all.js#xfbml=1"></script> 
56 
57<div class="bipo_gurebizkaia_detalle bg_gray"> 
58    <div class="container"> 
59        <div class="row"> 
60            <div class="col-xxs-12 col-xxs-offset-0 col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-offset-1 col-md-10"> 
61               <h1><span>${articleTitle}</span></h1> 
62            </div> 
63        </div> 
64    </div> 
65    <!-- Redes sociales, entradilla, contenido 1 y audio -->           
66    <div class="container"> 
67        <div class="row"> 
68            <div class="col-xxs-12 col-xxs-offset-0 col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-offset-1 col-md-10"> 
69                <div class="bipo_thumb"> 
70                    <#if validator.equals("", mainImage.getChild('video').getData())> 
71                      <div><img src="${mainImage.getData()}" alt="${htmlUtil.escape(mainImage.getChild('mainImageAlt').getData())}" /></div> 
72                    <#else> 
73                      <video class="lg-video-object lg-html5" controls> 
74                            <source src="${mainImage.getChild('video').getData()}" type="video/mp4"> 
75                             <@liferay.language key="html5-not-supported" /> 
76                        </video>                         
77                    </#if> 
78                </div> 
79            </div> 
80            <#if !validator.equals("", mainImage.getChild('video').getData()) && !validator.equals("", mainImage.getChild('video').getChild('description').getData())> 
81                <div class="col-xxs-12 col-xxs-offset-0 col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-offset-1 col-md-10"> 
82                    <div class="bipo_transcripcion panel-group" id="${portletNamespace}bipo_acordeon">                      
83                        <div class="panel panel-default"> 
84                            <p class="panel-title">                                     
85                                <a id="yui_patched_v3_11_0_1_1479907610398_698" class="collapsed" data-toggle="collapse" data-parent="${portletNamespace}bipo_acordeon" href="#${portletNamespace}collapseSection" aria-controls="${portletNamespace}collapseSection" aria-expanded="false"> 
86                                    <@liferay.language key="gbi-reportaje-detalle.transcription" />                                   
87                                    <span class="pull-right bipoicon"></span> 
88                                </a> 
89                            </p> 
90                            <div class="panel-collapse collapse" id="${portletNamespace}collapseSection" aria-expanded="false"> 
91                                <div class="panel-body"> 
92                                    ${mainImage.getChild('video').getChild('description').getData()} 
93                                </div> 
94                            </div> 
95                        </div> 
96                    </div> 
97                </div> 
98            </#if> 
99        </div> 
100    </div> 
101             
102    <div class="container"> 
103        <div class="row"> 
104            <div class="col-xxs-12 col-xxs-offset-0 col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1"> 
105                <div class="bg_white"> 
106                    <div class="row"> 
107                        <div class="col-xxs-12 col-xxs-offset-0 col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-10 col-md-offset-2"> 
108                            <#if !validator.equals("0", categoryNames?size?string)> 
109                    <p class="bipo_detalle_categoria"> 
110                  <#list categoryNames as curCategory > 
111                    <#if !validator.equals("", curCategory)> 
112                      ${curCategory} 
113                    </#if> 
114                  </#list> 
115                </p> 
116              </#if> 
117                        </div> 
118                    </div> 
119                    <div class="row"> 
120                        <div class="col-md-1 col-md-offset-1 bipo_container_social"> 
121                            <@social />     
122                        </div> 
123                        <div class="col-xxs-10 col-xxs-offset-1 col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-10 col-md-offset-0"> 
124                <div class="row"> 
125                  <div class="col-md-10 bipo_entradilla"> 
126                      <#if !validator.equals("", introduction.getData())> 
127                    ${introduction.getData()} 
128                      </#if> 
129                  </div> 
130                    <#if !validator.equals("", audio.getData())> 
131                  <div class="col-xxs-12 col-xs-12 col-sm-12 col-md-4 pull-right"> 
132                                    <a href="${audio.getData()}" class="bipo_media"> 
133                                        <img src="${audioImage.getData()}" alt="${htmlUtil.escape(audioImage.getChild('audioImageAlt').getData())}"> 
134                                        <div>   
135                                            <#assign fileEntry = getFileEntry(audio.getData()) > 
136                                            <span class="bipoicon icon-microfono_contorno"></span> 
137                                            <span>${fileEntry.title}</span> 
138                                            <span>${audioDuration.getData()} min.</span> 
139                                        </div> 
140                                    </a> 
141                                </div> 
142                                </#if> 
143                                <#if !validator.equals("", body.getData())> 
144                                <div class="col-xxs-12 col-xs-12 col-sm-12 col-md-8 col-md-offset-0 bipo_contenido">     
145                      ${body.getData()} 
146                  </div> 
147                  </#if> 
148                </div> 
149              </div>                                              
150                    </div> 
151            <!-- Fin redes sociales, entradilla, contenido 1 y audio --> 
152             
153            <!-- Galería imágenes --> 
154            <#if secondaryImage.getSiblings()?has_content>   
155            <div class="row"> 
156              <div class="col-xxs-12 col-xxs-offset-0 col-xs-12 col-xs-offset-0 col-sm-12 col-sm-offset-0 col-md-10 col-md-offset-1"> 
157                <div class="bipo_galeria"> 
158                  <div id="contenedor_bipo_cohesion_detalle" data-interval="false" data-wrap="true"> 
159                    <ul id="${portletNamespace}bipo_modelo_participacion"> 
160                                    <#list secondaryImage.getSiblings() as curSecondaryImage> 
161                                        <#assign fileEntry = getFileEntry(curSecondaryImage.getData()) > 
162                                    <#assign size = textFormatter.formatStorageSize(fileEntry.size, locale) > 
163                                     
164                                    <li> 
165                                      <a href="${curSecondaryImage.getData()}"   
166                                          class="bipo_item_galeria"  
167                                          data-sub-html="<p class='text-center'>${curSecondaryImage.getChild('secondaryImageAlt').getData()} - ${fileEntry.extension} ${size}</p>"> 
168                              <img src="${curSecondaryImage.getData()}" alt="${htmlUtil.escape(curSecondaryImage.getChild('secondaryImageAlt').getData())}"> 
169                            </a> 
170                        </li> 
171                        </#list> 
172                    </ul> 
173                     
174                                  <div class="bipo_info hidden-xxs hidden-xs hidden-sm"> 
175                       <span class="bipoicon icon-camara_contorno"></span><span class="sr-only"><@liferay.language key="image" /></span> 
176                       <span class="typeOswald"><@liferay.language key="gbi-reportaje-detalle.from-to-images" /> 
177</span> 
178                       <span id="${portletNamespace}title"></span> 
179                    </div> 
180                  </div> 
181                </div> 
182                <!-- fin .galeria --> 
183              </div> 
184            </div> 
185            </#if> 
186            <!-- Fin Galería imágenes --> 
187            <!-- Contenido 2 y sumario --> 
188                    <div class="row"> 
189                         
190                        <div class="col-xxs-10 col-xxs-offset-1 col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-7 col-md-offset-2 bipo_contenido"> 
191                            <#if !validator.equals("", body2.getData())> 
192                                ${body2.getData()} 
193                            </#if> 
194                            <#if !validator.equals("", quote.getData())> 
195                                <div class="bipo_texto_destacado"> 
196                                    <span><img src="${pathThemeImages}/bizkaia/detalle-cita.png" alt=""></span> 
197                                    <blockquote>${quote.getData()}</blockquote> 
198                                </div> 
199                            </#if> 
200                        </div> 
201 
202                        <div class="col-xxs-10 col-xxs-offset-1 col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-2 col-md-offset-0 bipo_sumario"> 
203                            <#if !validator.equals("", summary.getData())> 
204                            <h3 class="bipo_titulo"><@liferay.language key="gbi-reportaje-detalle.more-information" /></h3> 
205                             
206                            <p>${summary.getData()}</p> 
207 
208                            </#if> 
209                        </div> 
210                         
211 
212 
213                        <div class="visible-xxs col-xxs-10 col-xxs-offset-1 hidden-xs hidden-sm hidden-md hidden-lg"> 
214                            <@social />    
215                        </div> 
216                    </div> 
217                    <!-- Fin Contenido 2 y sumario --> 
218                </div> 
219            </div> 
220        </div> 
221    </div> 
222    <#if !validator.equals("0", categoryIds?size?string)> 
223        <@showRelated /> 
224    </#if> 
225</div> 
226 
227<script type="text/javascript"> 
228  $(document).ready(function(){ 
229    var gallerySlider = $("#${portletNamespace}bipo_modelo_participacion").lightSlider({ 
230        item: 1, 
231      slideMargin: 0, 
232      slideMove: 1, 
233      loop: true, 
234      keyPress: true, 
235      pager: true, 
236      enableDrag: false, 
237        prevHtml: '<span class="bipoicon bipo_iconOpenRight" aria-hidden="true">←</span><span class="sr-only"><@liferay.language key="previous" /></span>', 
238        nextHtml: '<span class="bipoicon bipo_iconOpenRight" aria-hidden="true">→</span><span class="sr-only"><@liferay.language key="next" /></span>', 
239        onAfterSlide: function (el) { 
240            //console.log("afterSlide: " + el.getCurrentSlideCount() + "alt: '" + $('#${portletNamespace}bipo_modelo_participacion li.active img').attr('alt') + "'"); 
241              $('.current').text(el.getCurrentSlideCount()); 
242              $('#${portletNamespace}title').text($('#${portletNamespace}bipo_modelo_participacion li.active img').attr('alt')); 
243          }, 
244      onSliderLoad: function(el) { 
245              el.lightGallery({ 
246                  selector: '#${portletNamespace}bipo_modelo_participacion .lslide .bipo_item_galeria', 
247                  download: false 
248              }); 
249          }  
250    }); 
251     
252    $('.current').text("1"); 
253    $('.total').text(${secondaryImage.getSiblings()?size}); 
254    $('#${portletNamespace}title').text($('#${portletNamespace}bipo_modelo_participacion li.active img').attr('alt')); 
255  }); 
256</script> 
257 
258<#macro social> 
259  <div class="m-redes_sociales"> 
260    <ul> 
261        <li> 
262            <div class="taglib-social-bookmark-facebook" > 
263                    <div class="fb-like" data-href="${completeCurrentUrl}" data-layout="box_count" data-action="like" data-show-faces="false" data-share="false"></div> 
264                </div> 
265        </li> 
266      <li> 
267        <a class="facebook" href="http://www.facebook.com/sharer/sharer.php?u=${completeCurrentUrl}" target="_blank" title="<@liferay.language key='opens-new-window' />"> 
268          <span class="sr-only"><@liferay.language key="share-facebook" /></span><span class="bipoicon icon-facebook"></span> 
269        </a> 
270      </li> 
271      <li> 
272        <a class="twitter twitter-share-button" href="https://twitter.com/intent/tweet?url=${completeCurrentUrl}&text=${encodedTitle}" target="_blank" title="<@liferay.language key='opens-new-window' />" data-size="large"> 
273          <span class="sr-only"><@liferay.language key="share-twitter" /></span><span class="bipoicon icon-twitter"></span> 
274        </a> 
275      </li> 
276      <li> 
277        <a class="googleplus" href="https://plus.google.com/share?url=${completeCurrentUrl}" target="_blank" title="<@liferay.language key='opens-new-window' />" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;"> 
278            <span class="sr-only"><@liferay.language key="share-google-plus" /></span><span class="bipoicon icon-google-plus"></span> 
279        </a> 
280      </li> 
281      <li> 
282        <a class="whatsapp" href="whatsapp://send?text=${completeCurrentUrl}" target="_blank" title="<@liferay.language key='opens-new-window' />"> 
283          <span class="sr-only"><@liferay.language key="share-whatsapp" /></span><span class="bipoicon icon-whatsapp"></span> 
284        </a> 
285      </li> 
286    </ul> 
287  </div> 
288</#macro> 
289 
290<#macro showRelated> 
291    <#assign assetEntryQuery = objectUtil("com.liferay.asset.kernel.service.persistence.AssetEntryQuery") /> 
292    ${assetEntryQuery.setClassTypeIds([getterUtil.getLong(structure.structureId)])} 
293    ${assetEntryQuery.setAllCategoryIds(categoryIds)} 
294     
295     ${assetEntryQuery.setOrderByCol1("publishDate")} 
296     
297    <#assign hits = assetUtil.search(httpServletRequest, assetEntryQuery, -1, -1)> 
298    <#assign results = assetHelperLocalService.assetUtilGetAssetEntries(hits) > 
299     
300    <#assign maxRelated = results?size > 
301    <#if maxRelated gt 3> 
302        <#assign maxRelated = 3 /> 
303    </#if> 
304 
305    <#assign numRelated = 0 /> 
306     
307  <#if !validator.equals("1", maxRelated?string) > 
308        <div class="container bipo_gurebizkaia"> 
309            <div class="row"> 
310                <div class="col-xxs-12 col-xxs-offset-0 col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-12 col-md-offset-0"> 
311                    <div class="bipo_borde_inferior_b"> 
312                    <h2><@liferay.language key="gbi-reportaje-detalle.plus" /></h2> 
313                    </div> 
314                </div> 
315            </div> 
316             
317          <div class="row"> 
318              <div class="col-xxs-12 col-xxs-offset-0 col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-12 col-md-offset-0 bipo_masreportajes"> 
319                  <ul class="row"> 
320                      <#list results as entry> 
321 
322                          <#assign title = entry.getTitle(locale)  /> 
323                          <#assign renderer = entry.getAssetRenderer()> 
324                          <#assign className = renderer.getClassName() > 
325                           
326                          <#if validator.equals(className?string, journalArticleClassName) > 
327                              <#assign journalArticle = renderer.getArticle() > 
328                              <#assign document = saxReaderUtil.read(journalArticle.getContent()) > 
329                              <#assign rootElement = document.getRootElement() > 
330                               
331                              <#assign introduction="", image="", alt="", video="" > 
332                              <#assign introduction = saxReaderUtil.createXPath("dynamic-element[@name='introduction']/dynamic-content").selectSingleNode(rootElement).getStringValue()  > 
333                              <#assign image = saxReaderUtil.createXPath("dynamic-element[@name='mainImage']/dynamic-content").selectSingleNode(rootElement).getStringValue()  > 
334                              <#assign alt = saxReaderUtil.createXPath("dynamic-element[@name='mainImage']/dynamic-element[@name='mainImageAlt']/dynamic-content").selectSingleNode(rootElement).getStringValue()  > 
335                                <#assign video = saxReaderUtil.createXPath("dynamic-element[@name='mainImage']/dynamic-element[@name='video']/dynamic-content").selectSingleNode(rootElement).getStringValue()  > 
336                               
337                               
338                              <#if request?has_content> 
339                                  <#assign viewURL = assetHelperLocalService.getURLViewInContext(journalArticle, themeDisplay) > 
340                                <#else> 
341                                    <#assign viewURL = 'http://web.bizkaia.eus'> 
342                                </#if> 
343                              <#assign categories = assetCategoryLocalService.getCategories(className, journalArticle.resourcePrimKey) > 
344                              <#assign categoryNames = []> 
345                        <#list categories as category> 
346                          <#if validator.equals(category.vocabularyId?string,vocabularyTopicsId?string)> 
347                            <#assign categoryNames = categoryNames + [ "${category.getTitle(locale)}" ] /> 
348                          </#if> 
349                        </#list> 
350                               
351                          </#if>    
352                            
353                          <#if !validator.equals(journalArticle.getArticleId()?string, articleId?string)> 
354                            <#if validator.equals(numRelated?string, maxRelated?string)> 
355                                    <#break> 
356                                </#if> 
357                            <li class="col-md-4"> 
358                                <div class="bipo_reportcontent"> 
359                                    <div class="row"> 
360                                        <div class="col-xxs-12 col-xs-6 col-sm-6 col-md-12"> 
361                                            <#if validator.equals("", video)> 
362                                        <a href="${viewURL}">  
363                                            <img src="${image}" alt="${htmlUtil.escape(alt)}" />  
364                                        </a> 
365                                    <#else> 
366                                        <div class="bipo_videos"> 
367                                            <a href="${viewURL}"> 
368                                               <div class="bipo_video">  
369                                                    <span class="bipoicon icon-player"></span>  
370                                                </div> 
371                                                <div class="bipo_overlay"> </div> 
372                                                <img src="${image}" alt="${htmlUtil.escape(alt)}"/> 
373                                            </a> 
374                                        </div> 
375                                    </#if> 
376                                        </div> 
377                                        <div class="col-xxs-12 col-xs-6 col-sm-6 col-md-12"> 
378                                            <div class="bipo_reportcontentdescr"> 
379                                            <#list categoryNames as curCategory> 
380                                                <p class="bipo_catreportaje"> 
381                                                    ${curCategory} 
382                                                </p> 
383                                            </#list> 
384                                            <h2 class="bipo_tit15"> 
385                                                <a href="${viewURL}">${title}</a> 
386                                            </h2> 
387                                            ${stringUtil.shorten(introduction, 80)} 
388                                            <a href="${viewURL}"><span class="bipoicon bipo_iconOpenRight" aria-hidden="true">→</span><span class="sr-only"><@liferay.language key="read-more" /></span></a> 
389                                          </div> 
390                                       </div> 
391                                    </div> 
392                                 </div>     
393                            </li> 
394                            <#assign numRelated = numRelated + 1 /> 
395                          </#if> 
396                      </#list> 
397                  </ul> 
398              </div> 
399          </div> 
400    </div> 
401    </#if> 
402</#macro> 
403 
404<#function getFileEntry url > 
405  <#assign parts = url?split("/")> 
406   
407  <#assign group_id = getterUtil.getLong(parts[2]) /> 
408   
409  <#assign parts = parts[5]?split("?") /> 
410  <#assign uuid = parts[0] /> 
411   
412  <#return fileEntryService.getDLFileEntryByUuidAndGroupId(uuid?string, group_id) /> 
413</#function>