An error occurred while processing the template.
The following has evaluated to null or missing: ==> ddmFormFieldValue.getValue().getString(locale) [in template "10112#522485#25803229" at line 87, column 63] ---- 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 horaInicio = ddmFormFieldValu... [in template "10112#522485#25803229" at line 87, column 41] ----
1<#assign
2 groupLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService")
3 layoutLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService")
4 journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")
5 ddmStructureLocalService = serviceLocator.findService("com.liferay.dynamic.data.mapping.service.DDMStructureLocalService")
6 ddmFieldLocalServiceUtil = serviceLocator.findService("com.liferay.dynamic.data.mapping.service.DDMFieldLocalService")
7/>
8
9<#if themeDisplay.getTheme().getContextPath() == "/o/upv-ehu-global-theme">
10<#assign colorSchemeId = themeDisplay.getColorSchemeId() />
11<#if colorSchemeId?has_content && colorSchemeId=="08">
12 <#if entries?has_content>
13 <#assign randomName = randomNamespace />
14 <div class="news_list-wrapper">
15 <div class="news_title">
16 <h2 id="title_${randomName}">${languageUtil.get(locale, "centros.title.events")}</h2>
17 <#list portletPreferences?keys as key>
18 <#assign values = portletPreferences[key] />
19
20 <#if values?has_content>
21 <#if key == "paginationType">
22 <#list values as value>
23 <#if value == "none">
24 <#-- Se recupera la página de visualización del campo personalizado correspondiente del site -->
25 <#assign groupId = themeDisplay.getScopeGroupId()/>
26 <#assign sitio = groupLocalService.fetchGroup(groupId)/>
27 <#assign FriendlyPageEvents = (sitio.getExpandoBridge().getAttribute("FriendlyPageEvents"))!"">
28 <#if FriendlyPageEvents?has_content>
29 <#assign friendlyURL = FriendlyPageEvents?string />
30 <#if friendlyURL?has_content >
31 <#if layoutLocalService.fetchLayoutByFriendlyURL(groupId, false, friendlyURL)??>
32 <#assign layout = layoutLocalService.fetchLayoutByFriendlyURL(groupId, false, friendlyURL)/>
33 <#if layout?? >
34 <#assign urlLayout>${portalUtil.getLayoutFriendlyURL(layout, themeDisplay)}</#assign>
35 <#if urlLayout?? >
36 <a href="${urlLayout}" id="btn_${randomName}" aria-labelledby="btn_${randomName} title_${randomName}" class="linkArrow">
37 <span>${languageUtil.get(locale, "ehu-view-more")}</span>
38 </a>
39 </#if>
40 </#if>
41 </#if>
42 </#if>
43 </#if>
44 </#if>
45 </#list>
46 </#if>
47 </#if>
48 </#list>
49
50 </div>
51
52 <#assign
53 pretitulo = ""
54 titulo = ""
55 subtitulo = ""
56 fechaInicio = ""
57 horaInicio = ""
58 minInicio = ""
59 fechaFin = ""
60 horaFin = ""
61 minFin = ""
62 showOnlyYearMonth = ""
63 />
64
65 <ul class="list-group news_list-list">
66 <#list entries as entry>
67 <#assign assetRenderer = entry.getAssetRenderer() />
68 <#assign journalArticle = assetRenderer.getAssetObject()/>
69 <#assign structure = ddmStructureLocalService.fetchStructure(entry.getClassTypeId()) />
70 <#assign ddmFormValues = ddmFieldLocalServiceUtil.getDDMFormValues(structure.getDDMForm(), journalArticle.getId())/>
71 <#assign ddmFormFieldValuesMap = ddmFormValues.getDDMFormFieldValuesMap(true)>
72 <#list ddmFormFieldValuesMap as key,ddmFormFieldValues>
73 <#list ddmFormFieldValues as ddmFormFieldValue>
74 <#if ddmFormFieldValue.getName()=="ehupretitle">
75 <#assign pretitulo = ddmFormFieldValue.getValue().getString(locale)/>
76 </#if>
77 <#if ddmFormFieldValue.getName()=="ehutitle">
78 <#assign titulo = ddmFormFieldValue.getValue().getString(locale)/>
79 </#if>
80 <#if ddmFormFieldValue.getName()=="ehunewsubtitle">
81 <#assign subtitulo = ddmFormFieldValue.getValue().getString(locale)/>
82 </#if>
83 <#if ddmFormFieldValue.getName()=="ehustartdatehour" >
84 <#assign fechaInicio = ddmFormFieldValue.getValue().getString(locale)/>
85 </#if>
86 <#if ddmFormFieldValue.getName()=="ehustartdatehourhh">
87 <#assign horaInicio = ddmFormFieldValue.getValue().getString(locale)/>
88 </#if>
89 <#if ddmFormFieldValue.getName()=="ehustartdatehourmm">
90 <#assign minInicio = ddmFormFieldValue.getValue().getString(locale)/>
91 </#if>
92 <#if ddmFormFieldValue.getName()=="ehuenddatehour">
93 <#assign fechaFin = ddmFormFieldValue.getValue().getString(locale)/>
94 </#if>
95 <#if ddmFormFieldValue.getName()=="ehuenddatehourhh">
96 <#assign horaFin = ddmFormFieldValue.getValue().getString(locale)/>
97 </#if>
98 <#if ddmFormFieldValue.getName()=="ehuenddatehourmm">
99 <#assign minFin = ddmFormFieldValue.getValue().getString(locale)/>
100 </#if>
101 <#if ddmFormFieldValue.getName()=="ehushowonlyyearmonth">
102 <#assign showOnlyYearMonth = ddmFormFieldValue.getValue().getString(locale)/>
103 </#if>
104 </#list>
105 </#list>
106
107
108 <#-- Arreglamos las horas y minutos eliminando los caracteres raros que mete lifeary "[]" -->
109
110 <#assign horaInicio = horaInicio?replace('"', "")?replace("[", "")?replace("]", "")>
111 <#assign minInicio = minInicio?replace('"', "")?replace("[", "")?replace("]", "")>
112 <#assign horaFin = horaFin?replace('"', "")?replace("[", "")?replace("]", "")>
113 <#assign minFin = minFin?replace('"', "")?replace("[", "")?replace("]", "")>
114
115 <#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, entry) />
116
117
118 <#if assetRenderer?has_content && assetRenderer.getArticle??>
119 <#assign journal = assetRenderer.getArticle() />
120 <#if journal?has_content>
121 <#assign layoutUuid = journal.getLayoutUuid() />
122 <#if layoutUuid?has_content >
123 <#assign viewURL = assetRenderer.getURLViewInContext(renderRequest, renderResponse, viewURL) />
124 </#if>
125 </#if>
126 </#if>
127
128 <li class="list-group-item news_list-item">
129 <a href="${viewURL}" class="linkArrow sombra">
130 <div class="news_col">
131 <#if titulo?has_content >
132 <strong>${titulo}</strong>
133 </#if>
134
135 <span class="metadata-entry metadata-publish-date">
136
137 <#-- Cuando hay hora de inicio y hora de fin es un caso especial ya que hay que pintar primero los días y luego las horas -->
138 <#if (fechaInicio?has_content || fechaFin?has_content) && (horaInicio?has_content || horaFin?has_content) && showOnlyYearMonth == "false" >
139
140 <#if fechaInicio?has_content && fechaInicio!="chooseAnOption" >
141 <@getDayAndMonth fecha=fechaInicio />
142 </#if>
143 <#if (fechaInicio?has_content && fechaInicio!="chooseAnOption" ) && (fechaFin?has_content && fechaFin!="chooseAnOption")>
144 -
145 </#if>
146 <#if fechaFin?has_content && fechaFin!="chooseAnOption" >
147 <@getDayAndMonth fecha=fechaFin />
148 </#if>
149
150 <#if ( (horaInicio?has_content && horaInicio!="chooseAnOption") && (minInicio?has_content && minInicio!="chooseAnOption") )>
151 , <@getHourMin hora=horaInicio minutos=minInicio />
152 </#if>
153
154 <#if ( (horaFin?has_content && horaFin!="chooseAnOption") && (minFin?has_content && minFin!="chooseAnOption") )>
155 - <@getHourMin hora=horaFin minutos=minFin />
156 </#if>
157
158 <#else>
159 <#-- fecha inicio -->
160
161 <#if fechaInicio?has_content && fechaInicio!="chooseAnOption">
162 <#if showOnlyYearMonth == "true" >
163 <@getyearmonth fecha=fechaInicio />
164 <#else>
165 <@getDateField fecha=fechaInicio hora=horaInicio minutos=minInicio />
166 </#if>
167 </#if>
168
169 <#-- fecha fin -->
170
171 <#if fechaFin?has_content && fechaFin!="chooseAnOption" >
172 <#if showOnlyYearMonth == "true">
173 - <@getyearmonth fecha=fechaFin />
174 <#else>
175 - <@getDateField fecha=fechaFin hora=horaFin minutos=minFin />
176 </#if>
177 </#if>
178
179 </#if>
180
181 </span>
182
183 <#if pretitulo?has_content >
184 <span class="pretitle">${pretitulo}</span>
185 <#elseif subtitulo?has_content >
186 <span class="subtitle">${subtitulo}</span>
187 </#if>
188 </div>
189 </a>
190 </li>
191 </#list>
192
193 </ul>
194 </div>
195 </#if>
196<#else>
197 <div class="alert alert-error">
198 <@liferay.language key="ehu.error.theme-color" />
199 </div>
200</#if>
201<#else>
202 <div class="alert alert-error">
203 <@liferay.language key="ehu.error.theme-color" />
204 </div>
205</#if>
206
207<#macro getDateField fecha hora minutos >
208
209 <#assign localeStr = themeDisplay.getLocale() />
210 <#setting locale = localeStr>
211 <#-- Cuando la hora o el minuto es "00" Liferay devuelve "0" así que hay que arreglarlo -->
212 <#if hora?has_content && hora == "0">
213 <assign hora = "00">
214 </#if>
215 <#if minutos?has_content && minutos == "0">
216 <assign minutos = "00">
217 </#if>
218
219 <#-- <#if fecha?has_content && (hora?has_content && minutos?has_content) && (hora!="0" || minutos!="0") > -->
220 <#if fecha?has_content && (hora?has_content && minutos?has_content)>
221 <#assign dateFull = fecha+" "+hora+":"+minutos />
222 <#assign dateFormat = "dd MMMM, HH:mm" />
223 <#if localeStr=='eu_ES'>
224 <#assign dateFormat = "MMMM@ dd, HH:mm" />
225 <#elseif localeStr=='en_GB'>
226 <#assign dateFormat = "MMMM dd, HH:mm" />
227 </#if>
228 <#setting date_format=dateFormat>
229 <#if dateFull?has_content>
230 <#assign dateFull = (dateFull?datetime("yyyy-MM-dd HH:mm"))?date>
231 </#if>
232 <#else>
233 <#assign dateFormat = "dd MMMM" />
234 <#if localeStr=='eu_ES'>
235 <#assign dateFormat = "MMMM@ dd" />
236 <#elseif localeStr=='en_GB'>
237 <#assign dateFormat = "MMMM dd" />
238 </#if>
239 <#setting date_format=dateFormat>
240 <#if fecha?has_content >
241 <#assign dateFull = (fecha?datetime("yyyy-MM-dd"))?date>
242 </#if>
243 </#if>
244
245 <#if dateFull?has_content >
246 <#assign modifiedStr = dateFull?string>
247 <#if localeStr=='eu_ES'>
248 ${modifiedStr?replace("@", "k")}
249 <#else>
250 ${modifiedStr}
251 </#if>
252 </#if>
253</#macro>
254
255<#macro getyearmonth fecha >
256 <#assign localeStr = themeDisplay.getLocale() />
257 <#setting locale = localeStr>
258
259 <#if fecha?has_content >
260 <#assign dateFull = fecha />
261 <#assign dateFormat = "MMMM" />
262 <#setting date_format=dateFormat>
263 <#if dateFull?has_content>
264 <#assign dateFull = (dateFull?datetime("yyyy-MM-dd"))?date>
265 </#if>
266 <#else>
267 <#assign dateFormat = "MMMM" />
268 <#setting date_format=dateFormat>
269 <#if fecha?has_content >
270 <#assign dateFull = (fecha?datetime("yyyy-MM-dd"))?date>
271 </#if>
272 </#if>
273
274 <#if dateFull?has_content >
275 <#assign modifiedStr = dateFull?string>
276 ${modifiedStr}
277 </#if>
278</#macro>
279
280<#macro getHourMin hora minutos >
281
282 <#assign localeStr = themeDisplay.getLocale() />
283 <#setting locale = localeStr>
284 <#-- Cuando la hora o el minuto es "00" Liferay devuelve "0" así que hay que arreglarlo -->
285 <#if hora?has_content && hora == "0">
286 <assign hora = "00">
287 </#if>
288 <#if minutos?has_content && minutos == "0">
289 <assign minutos = "00">
290 </#if>
291
292 <#if hora?has_content && hora!="" && minutos?has_content && minutos!="">
293 <#assign dateFull = hora+":"+minutos />
294 <#assign dateFormat = "HH:mm" />
295 <#setting date_format=dateFormat>
296 <#if dateFull?has_content>
297 <#assign dateFull = (dateFull?datetime("HH:mm"))?date>
298 </#if>
299 <#else>
300 <#assign dateFormat = "HH:mm" />
301 <#setting date_format=dateFormat>
302 <#if fecha?has_content >
303 <#assign dateFull = (fecha?datetime("HH:mm"))?date>
304 </#if>
305 </#if>
306
307 <#if dateFull?has_content >
308 <#assign modifiedStr = dateFull?string>
309 <#if localeStr=='eu_ES'>
310 ${modifiedStr?replace("@", "k")}
311 <#else>
312 ${modifiedStr}
313 </#if>
314 </#if>
315</#macro>
316
317<#macro getDayAndMonth fecha >
318 <#assign localeStr = themeDisplay.getLocale() />
319 <#setting locale = localeStr>
320
321 <#if fecha?has_content>
322 <#assign dateFull = fecha />
323 <#assign dateFormat = "dd MMMM" />
324 <#if localeStr=='eu_ES'>
325 <#assign dateFormat = "MMMM@ dd" />
326 <#elseif localeStr=='en_GB'>
327 <#assign dateFormat = "MMMM dd" />
328 </#if>
329 <#setting date_format=dateFormat>
330 <#if dateFull?has_content>
331 <#assign dateFull = (dateFull?datetime("yyyy-MM-dd"))?date>
332 </#if>
333 <#else>
334 <#assign dateFormat = "dd MMMM" />
335 <#if localeStr=='eu_ES'>
336 <#assign dateFormat = "MMMM@ dd" />
337 <#elseif localeStr=='en_GB'>
338 <#assign dateFormat = "MMMM dd" />
339 </#if>
340 <#setting date_format=dateFormat>
341 <#if fecha?has_content >
342 <#assign dateFull = (fecha?datetime("yyyy-MM-dd"))?date>
343 </#if>
344 </#if>
345
346 <#if dateFull?has_content >
347 <#assign modifiedStr = dateFull?string>
348 <#if localeStr=='eu_ES'>
349 ${modifiedStr?replace("@", "k")}
350 <#else>
351 ${modifiedStr}
352 </#if>
353 </#if>
354</#macro>
—
10 Items per Page