Back ESTRENOS CROSSOVER: VIDA PERFECTA
The following has evaluated to null or missing: ==> langs[idioma.getData()] [in template "20907#20945#2372814" at line 48, column 41] ---- 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: ${langs[idioma.getData()]} [in template "20907#20945#2372814" at line 48, column 39] ----
1<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")>
2<#assign assetLinkLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService")>
3<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService")>
4
5
6<#assign langs = {"EU" : "Euskara" , "ES" : "Gaztelera" , "EN" : "Ingelesa" , "FR" : "Frantzesa"} />
7<#assign days = {"Mon" : "Astelehena" , "Tue" : "Asteartea" , "Wed" : "Asteazkena" , "Thu" : "Osteguna" , "Fri" : "Ostirala" , "Sat" : "Larunbata" , "Sun" : "Igandea"} />
8<#assign textoVerEvento ="IKUSI GERTAERA" />
9
10<#if locale.toString() == "es_ES">
11 <#assign langs = {"EU" : "Euskera" , "ES" : "Castellaño" , "EN" : "Ingelés" , "FR" : "Frances"}/>
12 <#assign days = {"Mon" : "Lunes" , "Tue" : "Martes" , "Wed" : "Miercoles" , "Thu" : "Jueves" , "Fri" : "Viernes" , "Sat" : "Sábado" , "Sun" : "Domingo"}/>
13 <#assign textoVerEvento ="VER EVENTO"/>
14</#if>
15
16
17
18<#assign textoVerFotos = "Ver fotos">
19<#assign textoDescargarPDF = "Descargar PDF">
20
21<div itemscope="" itemtype="http://schema.org/Event">
22 <div class="row-fluid">
23 <div class="span4">
24 <div class="info pr3-ns pb5">
25 <div class="ba">
26 <div class="aspect-ratio aspect-ratio--16x9 bb overflow-hidden">
27 <iframe class="w-100 aspect-ratio--object filter-grayscale" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="https://www.openstreetmap.org/export/embed.html?bbox=-1.9839549064636233%2C43.31346526792129%2C-1.9803071022033694%2C43.31597498178434&layer=mapnik" style="height: 200px;">
28 </iframe>
29 </div>
30
31 <div class="pa3 f7">
32 <div class="pb3">
33 <div class="mb2" content="2019-09-19T19:00" itemprop="startDate">
34
35 <#call pintaFecha(fecha.getData())> <span class="fw5">${Ordua.getData()}</span>
36
37
38
39 </div>
40
41 <div class="mb2" itemprop="location" itemscope="" itemtype="http://schema.org/Place">
42 <a href="#" itemprop="url">
43 ${lugar.getData()}
44 </a>
45 </div>
46
47 <div itemprop="inLanguage" itemscope="" itemtype="http://schema.org/Language">
48 <span itemprop="name">${langs[idioma.getData()]}</span>
49 </div>
50 </div>
51 <#if enlaceFotos.getData()?trim != ""> <a class="db f8 text-center link pt2 pr3 pb2 pl3 btn-holder ttu tracked mb2" href="${enlaceFotos.getData()}">
52 ${textoVerFotos}
53 </a>
54 </#if> <#if enlacePDF?? && enlacePDF.getData()?trim != ""> <a class="db f8 text-center link pt2 pr3 pb2 pl3 btn-holder ttu tracked bg-black white" href="${enlacePDF.getData()}">
55 ${textoDescargarPDF}
56 </a>
57 </#if> </div>
58 </div>
59 </div>
60 </div>
61
62 <div class="span8">
63 <div class="pr3 bb3">
64 <div class="pb4">
65 <h1 class="f2 lh-title ma0">${.vars['reserved-article-title'].data}</h1>
66 </div>
67
68 <div class="description">
69 <p class="f6">
70 ${descripcion.getData()}
71 </p>
72 </div>
73
74 <div class="flex">
75
76 <#assign currentArticle = journalArticleLocalService.getArticle(getterUtil.getLong(groupId), .vars['reserved-article-id'].data)>
77<#assign currentArticleResourcePrimKey = currentArticle.getResourcePrimKey()>
78<#assign currentArticleAssetEntry = assetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", currentArticleResourcePrimKey)>
79<#assign currentArticleAssetEntryEntryId = currentArticleAssetEntry.getEntryId()>
80<#assign currentArticleRelatedLinks = assetLinkLocalService.getDirectLinks(currentArticleAssetEntryEntryId)>
81 <#foreach link in currentArticleRelatedLinks>
82<#assign linkedAssetEntryId = link.getEntryId2()>
83<#assign linkedAssetEntry = assetEntryLocalService.getEntry(linkedAssetEntryId)>
84<#assign linkedAssetEntryPrimaryKey = linkedAssetEntry.getClassPK()>
85<#assign linkedArticle = journalArticleLocalService.getLatestArticle(linkedAssetEntryPrimaryKey)>
86<#assign linkedArticleTitle = linkedArticle.getTitle(locale)>
87<#assign document = saxReaderUtil.read(linkedArticle.getContent())>
88<#assign subtitulo = document.selectSingleNode("/root/dynamic-element[@name='subtitulo']/dynamic-content")>
89<#assign subtituloText = subtitulo.getText()>
90 <#assign imagen = document.valueOf("//dynamic-element[@name='imagen']/dynamic-content/text()") />
91 <#if imagen?? && imagen != "">
92 <#assign imagenJSON = imagen?eval />
93 <#assign imagenURL = "/documents/"+imagenJSON.groupId+"/"+imagenJSON.uuid />
94 </#if>
95 <div class="w-50 pt3">
96 <a class="flex items-center flex-wrap" href="/web/kultura/-/${linkedArticle.getUrlTitle()}">
97 <span class="db w-20">
98 <span class="db relative br-pill overflow-hidden">
99 <span class="db spect-ratio aspect-ratio--1x1">
100 <img alt="" class="aspect-ratio--object z-1" src="${imagenURL}" />
101 </span>
102 </span>
103 </span>
104 <span class="db w-80">
105 <span class="db pl3">
106 <h4 class="f5 fw7 ma0">${linkedArticleTitle}</h4>
107 <h5 class="f8 fw5 ma0">${subtituloText}</h5>
108 </span>
109 </span>
110 </a>
111 </div>
112 </#foreach>
113
114
115
116 </div>
117 </div>
118 </div>
119 </div>
120</div>
121
122<#macro pintaFecha(fechaText)>
123<#assign fecha_DateObj = dateUtil.parseDate("yyyy-MM-dd", fechaText, locale)>
124<#assign diaSemana = dateUtil.getDate(fecha_DateObj, "EEE", localeUtil.US, timeZoneUtil.getTimeZone("UTC"))>
125 ${days[diaSemana]}, ${dateUtil.getDate(fecha_DateObj, "dd.MM.yyyy", localeUtil.US, timeZoneUtil.getTimeZone("UTC"))} ,
126</#macro>