Breadcrumb

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: "2016-09-08 null:null". The expected format was: "yyyy-MM-dd HH:mm".
The nested reason given follows:
Unparseable date: "2016-09-08 null:null"

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign dateFull = (dateFull?datetime...  [in template "10112#522485#25803229" in macro "getDateField" at line 169, column 21]
	- Reached through: @getDateField fecha=fechaInicio hora=...  [in template "10112#522485#25803229" at line 70, column 57]
----
1<#assign groupLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService")> 
2<#assign layoutLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService")> 
3<#if themeDisplay.getTheme().getContextPath() == "/o/upv-ehu-global-theme"> 
4<#assign colorSchemeId = themeDisplay.getColorSchemeId() /> 
5<#if colorSchemeId?has_content && colorSchemeId=="08"> 
6	<#if entries?has_content> 
7    <div class="news_list-wrapper"> 
8        <h2 class="title">${languageUtil.get(locale, "centros.title.events")} </h2> 
9        <ul class="list-group news_list-list"> 
10            <#list entries as entry>				 
11                <#assign assetRenderer = entry.getAssetRenderer() /> 
12 
13                <#assign docXml = saxReaderUtil.read(entry.getAssetRenderer().getArticle().getContentByLocale(locale))/> 
14                <#assign pretitulo = docXml.valueOf("//dynamic-element[@name='ehupretitle']/dynamic-content/text()") /> 
15                <#assign titulo = docXml.valueOf("//dynamic-element[@name='ehutitle']/dynamic-content/text()") /> 
16                <#assign subtitulo = docXml.valueOf("//dynamic-element[@name='ehunewsubtitle']/dynamic-content/text()") /> 
17                 
18                <#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, entry) /> 
19 
20                <#--  <#if assetLinkBehavior != "showFullContent"> 
21                    <#assign viewURL = assetRenderer.getURLViewInContext(renderRequest, renderResponse, viewURL) /> 
22                </#if>  --> 
23				<#if assetRenderer?has_content && assetRenderer.getArticle??> 
24                    <#assign journal = assetRenderer.getArticle() /> 
25                    <#if journal?has_content> 
26                        <#assign layoutUuid = journal.getLayoutUuid() /> 
27                        <#if layoutUuid?has_content > 
28                        	<#assign viewURL = assetRenderer.getURLViewInContext(renderRequest, renderResponse, viewURL) /> 
29                        </#if>  
30                    </#if> 
31                </#if> 
32 
33 
34 
35 
36                <li class="list-group-item news_list-item"> 
37                    <a href="${viewURL}" class="news_list-link"> 
38                        
39					<span class="metadata-entry metadata-publish-date"> 
40					     
41					    <#assign fechaInicio = docXml.valueOf("//dynamic-element[@name='ehustartdatehour']/dynamic-content/text()")!"" /> 
42                        <#assign horaInicio = docXml.valueOf("//dynamic-element[@name='ehustartdatehourhh']/dynamic-content/text()")!""/> 
43                        <#assign minInicio = docXml.valueOf("//dynamic-element[@name='ehustartdatehourmm']/dynamic-content/text()")!"" /> 
44                        <#assign fechaFin = docXml.valueOf("//dynamic-element[@name='ehuenddatehour']/dynamic-content/text()")!""/> 
45                        <#assign horaFin = docXml.valueOf("//dynamic-element[@name='ehuenddatehourhh']/dynamic-content/text()")!""/> 
46						<#assign minFin = docXml.valueOf("//dynamic-element[@name='ehuenddatehourmm']/dynamic-content/text()")!""/> 
47						<#assign showOnlyYearMonth = docXml.valueOf("//dynamic-element[@name='ehushowonlyyearmonth']/dynamic-content/text()")!""/> 
48						 
49												 
50						<#-- 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 --> 
51						<#if (fechaInicio?has_content || fechaFin?has_content) && (horaInicio?has_content || horaFin?has_content) && showOnlyYearMonth == "" > 
52							<#if fechaInicio?has_content > 
53								<@getDayAndMonth fecha=fechaInicio /> 
54							</#if> 
55							<#if (fechaInicio?has_content && fechaFin?has_content) > 
56							  -  
57							</#if> 
58							<#if fechaFin?has_content > 
59								<@getDayAndMonth fecha=fechaFin /> 
60							</#if>  
61							, <@getHourMin hora=horaInicio minutos=minInicio /> 
62							<#if horaFin?has_content > 
63							  - <@getHourMin hora=horaFin minutos=minFin /> 
64							</#if>											 
65						<#else> 
66							<#--fecha inicio -->																							 
67							<#if showOnlyYearMonth == "true"> 
68								<@getyearmonth fecha=fechaInicio /> 
69							<#else> 
70						    	<@getDateField fecha=fechaInicio hora=horaInicio minutos=minInicio /> 
71							</#if> 
72														 
73							<#--fecha fin -->				 
74							<#if fechaFin?has_content > 
75								<#if showOnlyYearMonth == "true"> 
76									- <@getyearmonth fecha=fechaFin /> 
77								<#else> 
78									- <@getDateField fecha=fechaFin hora=horaFin minutos=minFin /> 
79								</#if>							 
80							</#if> 
81						</#if>	 
82							 							 
83							 
84						 
85					</span>	  
86					 
87					<#if pretitulo?has_content > 
88						<p class="pretitle">${pretitulo}</p> 
89					<#elseif titulo?has_content > 
90						<p>${titulo}</p> 
91					<#elseif subtitulo?has_content > 
92						<p class="subtitle">${subtitulo}</p> 
93					</#if> 
94					 
95                    </a> 
96                </li> 
97            </#list> 
98            <#list portletPreferences?keys as key> 
99                <#assign values = portletPreferences[key] /> 
100                 
101                <#if values?has_content> 
102                    <#if key == "paginationType"> 
103                        <#list values as value> 
104                            <#if value == "none"> 
105                                <li class="list-group-item news_list-item"> 
106									<#-- Se recupera la página de visualización del campo personalizado correspondiente del site -->										 
107									<#assign groupId = themeDisplay.getScopeGroupId()/> 
108									<#assign sitio = groupLocalService.fetchGroup(groupId)/> 
109									<#assign FriendlyPageEvents = (sitio.getExpandoBridge().getAttribute("FriendlyPageEvents"))!""> 
110									<#if FriendlyPageEvents?has_content>	 
111										<#assign friendlyURL = FriendlyPageEvents?string /> 
112										<#if friendlyURL?has_content >										 
113											<#if layoutLocalService.fetchLayoutByFriendlyURL(groupId, false, friendlyURL)??> 
114												<#assign layout = layoutLocalService.fetchLayoutByFriendlyURL(groupId, false, friendlyURL)/>											 
115												<#if layout?? >																 
116													<#assign urlLayout>${portalUtil.getLayoutFriendlyURL(layout, themeDisplay)}</#assign>										 
117													<#if urlLayout?? > 
118														<a class="btn btn-more" href="${urlLayout}" role="button"> 
119														${languageUtil.get(locale, "ehu-view-more")} <i class="icon-chevron-right fa fa-chevron-right" aria-hidden="true"></i>																																				 
120														</a> 
121													</#if> 
122												</#if>	 
123											</#if>														 
124										</#if>														 
125									</#if>														 
126                                </li> 
127                            </#if> 
128                        </#list> 
129                    </#if> 
130                </#if> 
131            </#list> 
132        </ul> 
133    </div> 
134    </#if> 
135<#else> 
136   <div class="alert alert-error">  
137      <@liferay.language key="ehu.error.theme-color" /> 
138   </div> 
139</#if> 
140<#else> 
141   <div class="alert alert-error">  
142      <@liferay.language key="ehu.error.theme-color" /> 
143   </div> 
144</#if> 
145 
146<#macro getDateField fecha hora minutos > 
147     
148		<#assign localeStr = themeDisplay.getLocale() />   
149    	<#setting locale = localeStr>	 
150			<#-- Cuando la hora o el minuto es "00" Liferay devuelve "0" así que hay que arreglarlo --> 
151			<#if hora?has_content && hora == "0"> 
152				<assign hora = "00"> 
153			</#if> 
154			<#if minutos?has_content && minutos == "0"> 
155				<assign minutos = "00"> 
156			</#if> 
157    	 
158    		<#-- <#if fecha?has_content && (hora?has_content && minutos?has_content) && (hora!="0" || minutos!="0") > -->    	 
159			<#if fecha?has_content && (hora?has_content && minutos?has_content)>    	 
160    		    <#assign dateFull =   fecha+" "+hora+":"+minutos /> 
161    		    <#assign dateFormat = "dd MMMM, HH:mm" /> 
162        		<#if localeStr=='eu_ES'> 
163        		     <#assign dateFormat = "MMMM@ dd, HH:mm" />   
164        		<#elseif localeStr=='en_GB'> 
165        		     <#assign dateFormat = "MMMM dd, HH:mm" />                 
166        		</#if> 
167        		<#setting date_format=dateFormat> 
168        		<#if dateFull?has_content> 
169                    <#assign dateFull = (dateFull?datetime("yyyy-MM-dd HH:mm"))?date> 
170                </#if> 
171    		    <#else>   
172    		        <#assign dateFormat = "dd MMMM" /> 
173                	<#if localeStr=='eu_ES'> 
174                	    <#assign dateFormat = "MMMM@ dd" />   
175                	<#elseif localeStr=='en_GB'> 
176                	     <#assign dateFormat = "MMMM dd" />                 
177                	</#if>	 
178                	<#setting date_format=dateFormat>		 
179                	<#if fecha?has_content > 
180                        <#assign dateFull = (fecha?datetime("yyyy-MM-dd"))?date> 
181                    </#if> 
182    		    </#if>    		                     
183    		 
184			<#if dateFull?has_content > 
185        		<#assign modifiedStr = dateFull?string> 
186                <#if localeStr=='eu_ES'> 
187                    ${modifiedStr?replace("@", "K")} 
188                <#else> 
189                    ${modifiedStr} 
190                </#if>			 
191            </#if> 
192</#macro> 
193 
194<#macro getyearmonth fecha >     
195		<#assign localeStr = themeDisplay.getLocale() />   
196    	<#setting locale = localeStr> 
197    	 
198			<#if fecha?has_content >    	 
199    		    <#assign dateFull =   fecha /> 
200    		    <#assign dateFormat = "MMMM" />        		 
201        		<#setting date_format=dateFormat> 
202        		<#if dateFull?has_content> 
203                    <#assign dateFull = (dateFull?datetime("yyyy-MM-dd"))?date> 
204                </#if> 
205			<#else>   
206				<#assign dateFormat = "MMMM" />				 
207				<#setting date_format=dateFormat>		 
208				<#if fecha?has_content > 
209					<#assign dateFull = (fecha?datetime("yyyy-MM-dd"))?date> 
210				</#if> 
211			</#if>    		                     
212    		 
213			<#if dateFull?has_content > 
214        		<#assign modifiedStr = dateFull?string> 
215                	${modifiedStr}                			 
216            </#if> 
217</#macro> 
218 
219<#macro getHourMin hora minutos > 
220     
221		<#assign localeStr = themeDisplay.getLocale() />   
222    	<#setting locale = localeStr>	 
223			<#-- Cuando la hora o el minuto es "00" Liferay devuelve "0" así que hay que arreglarlo --> 
224			<#if hora?has_content && hora == "0"> 
225				<assign hora = "00"> 
226			</#if> 
227			<#if minutos?has_content && minutos == "0"> 
228				<assign minutos = "00"> 
229			</#if> 
230    	    		    	 
231			<#if hora?has_content && minutos?has_content>    	 
232    		    <#assign dateFull = hora+":"+minutos /> 
233    		    <#assign dateFormat = "HH:mm" /> 
234        		<#setting date_format=dateFormat> 
235        		<#if dateFull?has_content> 
236                    <#assign dateFull = (dateFull?datetime("HH:mm"))?date> 
237                </#if> 
238    		    <#else>   
239    		        <#assign dateFormat = "HH:mm" /> 
240                	<#setting date_format=dateFormat>		 
241                	<#if fecha?has_content > 
242                        <#assign dateFull = (fecha?datetime("HH:mm"))?date> 
243                    </#if> 
244    		    </#if>    		                     
245    		 
246			<#if dateFull?has_content > 
247        		<#assign modifiedStr = dateFull?string> 
248                <#if localeStr=='eu_ES'> 
249                    ${modifiedStr?replace("@", "K")} 
250                <#else> 
251                    ${modifiedStr} 
252                </#if>			 
253            </#if> 
254</#macro> 
255 
256<#macro getDayAndMonth fecha >     
257		<#assign localeStr = themeDisplay.getLocale() />   
258    	<#setting locale = localeStr>	 
259    		    	 
260			<#if fecha?has_content>    	 
261    		    <#assign dateFull =   fecha /> 
262    		    <#assign dateFormat = "dd MMMM" /> 
263        		<#if localeStr=='eu_ES'> 
264        		     <#assign dateFormat = "MMMM@ dd" />   
265        		<#elseif localeStr=='en_GB'> 
266        		     <#assign dateFormat = "MMMM dd" />                 
267        		</#if> 
268        		<#setting date_format=dateFormat> 
269        		<#if dateFull?has_content> 
270                    <#assign dateFull = (dateFull?datetime("yyyy-MM-dd"))?date> 
271                </#if> 
272    		    <#else>   
273    		        <#assign dateFormat = "dd MMMM" /> 
274                	<#if localeStr=='eu_ES'> 
275                	    <#assign dateFormat = "MMMM@ dd" />   
276                	<#elseif localeStr=='en_GB'> 
277                	     <#assign dateFormat = "MMMM dd" />                 
278                	</#if>	 
279                	<#setting date_format=dateFormat>		 
280                	<#if fecha?has_content > 
281                        <#assign dateFull = (fecha?datetime("yyyy-MM-dd"))?date> 
282                    </#if> 
283    		    </#if>    		                     
284    		 
285			<#if dateFull?has_content > 
286        		<#assign modifiedStr = dateFull?string> 
287                <#if localeStr=='eu_ES'> 
288                    ${modifiedStr?replace("@", "K")} 
289                <#else> 
290                    ${modifiedStr} 
291                </#if>			 
292            </#if> 
293</#macro>