Asset Publisher

An error occurred while processing the template.
The string doesn't match the expected date/time/date-time format. The string to parse was: "null:null". The expected format was: "HH:mm".
The nested reason given follows:
Unparseable date: "null:null"

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign dateFull = (dateFull?datetime...  [in template "10112#522485#25803229" in macro "getHourMin" at line 300, column 21]
	- Reached through: @getHourMin hora=horaInicio minutos=m...  [in template "10112#522485#25803229" at line 153, column 83]
----
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.getValue()?? && ddmFormFieldValue.getValue().getString(locale)?has_content> 
75							<#if ddmFormFieldValue.getName()=="ehupretitle"> 
76	                        	<#assign pretitulo = ddmFormFieldValue.getValue().getString(locale)/> 
77	                        </#if> 
78	                        <#if ddmFormFieldValue.getName()=="ehutitle"> 
79	                        	<#assign titulo = ddmFormFieldValue.getValue().getString(locale)/> 
80	                        </#if> 
81	                        <#if ddmFormFieldValue.getName()=="ehunewsubtitle"> 
82	                        	<#assign subtitulo = ddmFormFieldValue.getValue().getString(locale)/> 
83	                        </#if> 
84	                        <#if ddmFormFieldValue.getName()=="ehustartdatehour"> 
85	                        	<#assign fechaInicio = ddmFormFieldValue.getValue().getString(locale)/> 
86	                        </#if> 
87	                        <#if ddmFormFieldValue.getName()=="ehustartdatehourhh"> 
88	                        	<#assign horaInicio = ddmFormFieldValue.getValue().getString(locale)/> 
89	                        </#if> 
90	                        <#if ddmFormFieldValue.getName()=="ehustartdatehourmm"> 
91	                        	<#assign minInicio = ddmFormFieldValue.getValue().getString(locale)/> 
92	                        </#if> 
93	                        <#if ddmFormFieldValue.getName()=="ehuenddatehour"> 
94	                        	<#assign fechaFin = ddmFormFieldValue.getValue().getString(locale)/> 
95	                        </#if> 
96	                        <#if ddmFormFieldValue.getName()=="ehuenddatehourhh"> 
97	                        	<#assign horaFin = ddmFormFieldValue.getValue().getString(locale)/>								 
98	                        </#if> 
99	                        <#if ddmFormFieldValue.getName()=="ehuenddatehourmm"> 
100	                        	<#assign minFin = ddmFormFieldValue.getValue().getString(locale)/> 
101	                        </#if> 
102	                        <#if ddmFormFieldValue.getName()=="ehushowonlyyearmonth"> 
103	                        	<#assign showOnlyYearMonth = ddmFormFieldValue.getValue().getString(locale)/> 
104	                        </#if> 
105						</#if> 
106					</#list> 
107				</#list> 
108				 
109				<#-- Arreglamos las horas y minutos eliminando los caracteres raros que mete lifeary "[]" -->		 
110				 
111				 
112				<#assign horaInicio = horaInicio?replace('"', "")?replace("[", "")?replace("]", "")> 
113				<#assign minInicio = minInicio?replace('"', "")?replace("[", "")?replace("]", "")> 
114				<#assign horaFin = horaFin?replace('"', "")?replace("[", "")?replace("]", "")> 
115				<#assign minFin = minFin?replace('"', "")?replace("[", "")?replace("]", "")> 
116 
117				<#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, entry) /> 
118 
119               
120				<#if assetRenderer?has_content && assetRenderer.getArticle??> 
121                    <#assign journal = assetRenderer.getArticle() /> 
122                    <#if journal?has_content> 
123                        <#assign layoutUuid = journal.getLayoutUuid() /> 
124                        <#if layoutUuid?has_content > 
125                        	<#assign viewURL = assetRenderer.getURLViewInContext(renderRequest, renderResponse, viewURL) /> 
126                        </#if>  
127                    </#if> 
128                </#if> 
129 
130                <li class="list-group-item news_list-item"> 
131                    <a href="${viewURL}" class="linkArrow sombra"> 
132						<div class="news_col"> 
133							<#if titulo?has_content > 
134								<strong>${titulo}</strong>   
135							</#if> 
136						 
137							<span class="metadata-entry metadata-publish-date"> 
138				 
139								<#-- 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 --> 
140								<#if (fechaInicio?has_content || fechaFin?has_content) && (horaInicio?has_content || horaFin?has_content) && showOnlyYearMonth == "false" > 
141								 
142									<#if fechaInicio?has_content > 
143										<@getDayAndMonth fecha=fechaInicio /> 
144									</#if> 
145									<#if fechaInicio?has_content && fechaFin?has_content > 
146									-  
147									</#if> 
148									<#if fechaFin?has_content > 
149										<@getDayAndMonth fecha=fechaFin /> 
150									</#if> 
151																										 
152									<#if horaInicio?has_content && minInicio?has_content> 
153										, <@getHourMin hora=horaInicio minutos=minInicio /> 
154									</#if> 
155									 
156									<#if horaFin?has_content && minFin?has_content> 
157									- <@getHourMin hora=horaFin minutos=minFin /> 
158									</#if> 
159														 
160								<#else> 
161								 
162									<#-- fecha inicio --> 
163							 
164									<#if fechaInicio?has_content > 
165										<#if showOnlyYearMonth == "true" > 
166											<@getyearmonth fecha=fechaInicio /> 
167										<#else> 
168											<@getDateField fecha=fechaInicio hora=horaInicio minutos=minInicio /> 
169										</#if> 
170									</#if> 
171														 
172									<#-- fecha fin -->				 
173							 
174									<#if fechaFin?has_content > 
175										<#if showOnlyYearMonth == "true"> 
176											- <@getyearmonth fecha=fechaFin /> 
177										<#else> 
178											- <@getDateField fecha=fechaFin hora=horaFin minutos=minFin /> 
179										</#if>							 
180									</#if> 
181							 
182								</#if> 
183							 
184							</span>	  
185							 
186							<#if pretitulo?has_content > 
187								<span class="pretitle">${pretitulo}</span> 
188							<#elseif subtitulo?has_content > 
189								<span class="subtitle">${subtitulo}</span> 
190							</#if> 
191						</div> 
192                    </a> 
193                </li> 
194            </#list> 
195             
196        </ul> 
197    </div> 
198    </#if> 
199<#else> 
200   <div class="alert alert-error">  
201      <@liferay.language key="ehu.error.theme-color" /> 
202   </div> 
203</#if> 
204<#else> 
205   <div class="alert alert-error">  
206      <@liferay.language key="ehu.error.theme-color" /> 
207   </div> 
208</#if> 
209 
210<#macro getDateField fecha hora minutos > 
211     
212		<#assign localeStr = themeDisplay.getLocale() />   
213    	<#setting locale = localeStr>	 
214			<#-- Cuando la hora o el minuto es "00" Liferay devuelve "0" así que hay que arreglarlo --> 
215			<#if hora?has_content && hora == "0"> 
216				<assign hora = "00"> 
217			</#if> 
218			<#if minutos?has_content && minutos == "0"> 
219				<assign minutos = "00"> 
220			</#if> 
221    	 
222    		<#-- <#if fecha?has_content && (hora?has_content && minutos?has_content) && (hora!="0" || minutos!="0") > -->    	 
223			<#if fecha?has_content && (hora?has_content && minutos?has_content)>    	 
224    		    <#assign dateFull =   fecha+" "+hora+":"+minutos /> 
225    		    <#assign dateFormat = "dd MMMM, HH:mm" /> 
226        		<#if localeStr=='eu_ES'> 
227        		     <#assign dateFormat = "MMMM@ dd, HH:mm" />   
228        		<#elseif localeStr=='en_GB'> 
229        		     <#assign dateFormat = "MMMM dd, HH:mm" />                 
230        		</#if> 
231        		<#setting date_format=dateFormat> 
232        		<#if dateFull?has_content> 
233                    <#assign dateFull = (dateFull?datetime("yyyy-MM-dd HH:mm"))?date> 
234                </#if> 
235    		    <#else>   
236    		        <#assign dateFormat = "dd MMMM" /> 
237                	<#if localeStr=='eu_ES'> 
238                	    <#assign dateFormat = "MMMM@ dd" />   
239                	<#elseif localeStr=='en_GB'> 
240                	     <#assign dateFormat = "MMMM dd" />                 
241                	</#if>	 
242                	<#setting date_format=dateFormat>		 
243                	<#if fecha?has_content > 
244                        <#assign dateFull = (fecha?datetime("yyyy-MM-dd"))?date> 
245                    </#if> 
246    		    </#if>    		                     
247    		 
248			<#if dateFull?has_content > 
249        		<#assign modifiedStr = dateFull?string> 
250                <#if localeStr=='eu_ES'> 
251                    ${modifiedStr?replace("@", "k")} 
252                <#else> 
253                    ${modifiedStr} 
254                </#if>			 
255            </#if> 
256</#macro> 
257 
258<#macro getyearmonth fecha >     
259		<#assign localeStr = themeDisplay.getLocale() />   
260    	<#setting locale = localeStr> 
261    	 
262			<#if fecha?has_content >    	 
263    		    <#assign dateFull =   fecha /> 
264    		    <#assign dateFormat = "MMMM" />        		 
265        		<#setting date_format=dateFormat> 
266        		<#if dateFull?has_content> 
267                    <#assign dateFull = (dateFull?datetime("yyyy-MM-dd"))?date> 
268                </#if> 
269			<#else>   
270				<#assign dateFormat = "MMMM" />				 
271				<#setting date_format=dateFormat>		 
272				<#if fecha?has_content > 
273					<#assign dateFull = (fecha?datetime("yyyy-MM-dd"))?date> 
274				</#if> 
275			</#if>    		                     
276    		 
277			<#if dateFull?has_content > 
278        		<#assign modifiedStr = dateFull?string> 
279                	${modifiedStr}                			 
280            </#if> 
281</#macro> 
282 
283<#macro getHourMin hora minutos > 
284     
285		<#assign localeStr = themeDisplay.getLocale() />   
286    	<#setting locale = localeStr>	 
287			<#-- Cuando la hora o el minuto es "00" Liferay devuelve "0" así que hay que arreglarlo --> 
288			<#if hora?has_content && hora == "0"> 
289				<assign hora = "00"> 
290			</#if> 
291			<#if minutos?has_content && minutos == "0"> 
292				<assign minutos = "00"> 
293			</#if> 
294    	    		    	 
295			<#if hora?has_content && hora!="" && minutos?has_content && minutos!="">    	 
296    		    <#assign dateFull = hora+":"+minutos /> 
297    		    <#assign dateFormat = "HH:mm" /> 
298        		<#setting date_format=dateFormat> 
299        		<#if dateFull?has_content> 
300                    <#assign dateFull = (dateFull?datetime("HH:mm"))?date> 
301                </#if> 
302    		    <#else>   
303    		        <#assign dateFormat = "HH:mm" /> 
304                	<#setting date_format=dateFormat>		 
305                	<#if fecha?has_content > 
306                        <#assign dateFull = (fecha?datetime("HH:mm"))?date> 
307                    </#if> 
308    		    </#if>    		                     
309    		 
310			<#if dateFull?has_content > 
311        		<#assign modifiedStr = dateFull?string> 
312                <#if localeStr=='eu_ES'> 
313                    ${modifiedStr?replace("@", "k")} 
314                <#else> 
315                    ${modifiedStr} 
316                </#if>			 
317            </#if> 
318</#macro> 
319 
320<#macro getDayAndMonth fecha >     
321		<#assign localeStr = themeDisplay.getLocale() />   
322    	<#setting locale = localeStr>	 
323    		    	 
324			<#if fecha?has_content>    	 
325    		    <#assign dateFull =   fecha /> 
326    		    <#assign dateFormat = "dd MMMM" /> 
327        		<#if localeStr=='eu_ES'> 
328        		     <#assign dateFormat = "MMMM@ dd" />   
329        		<#elseif localeStr=='en_GB'> 
330        		     <#assign dateFormat = "MMMM dd" />                 
331        		</#if> 
332        		<#setting date_format=dateFormat> 
333        		<#if dateFull?has_content> 
334                    <#assign dateFull = (dateFull?datetime("yyyy-MM-dd"))?date> 
335                </#if> 
336    		    <#else>   
337    		        <#assign dateFormat = "dd MMMM" /> 
338                	<#if localeStr=='eu_ES'> 
339                	    <#assign dateFormat = "MMMM@ dd" />   
340                	<#elseif localeStr=='en_GB'> 
341                	     <#assign dateFormat = "MMMM dd" />                 
342                	</#if>	 
343                	<#setting date_format=dateFormat>		 
344                	<#if fecha?has_content > 
345                        <#assign dateFull = (fecha?datetime("yyyy-MM-dd"))?date> 
346                    </#if> 
347    		    </#if>    		                     
348    		 
349			<#if dateFull?has_content > 
350        		<#assign modifiedStr = dateFull?string> 
351                <#if localeStr=='eu_ES'> 
352                    ${modifiedStr?replace("@", "k")} 
353                <#else> 
354                    ${modifiedStr} 
355                </#if>			 
356            </#if> 
357</#macro>