Publicador de contenidos

Se ha producido un error al procesar la plantilla.
The following has evaluated to null or missing:
==> parts2[1]  [in template "21222#21260#77071" at line 61, column 50]

----
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: #assign cal2M = parts2[1] + ""  [in template "21222#21260#77071" at line 61, column 33]
----
1<#if entries?size &gt; 0 >	 
2	<#-- Formato del idioma--> 
3	<#assign formato_idioma = "yyyy·MM·dd">	 
4	<#if locale == "es_ES"> 
5		<#assign formato_idioma = "dd·MM·yyyy">	 
6	<#elseif locale == "eu_ES"> 
7		<#assign formato_idioma = "yyyy·MM·dd">	 
8	<#elseif locale == "en_EN"> 
9		<#assign formato_idioma = "yyyy·MM·dd">	 
10	<#elseif locale == "fr_FR"> 
11		<#assign formato_idioma = "dd·MM·yyyy">	 
12	<#elseif locale == "de_DE"> 
13		<#assign formato_idioma = "dd·MM·yyyy">	 
14	<#elseif locale == "ca_ES"> 
15		<#assign formato_idioma = "dd·MM·yyyy">	 
16	<#elseif locale == "gl_ES"> 
17		<#assign formato_idioma = "dd·MM·yyyy">	 
18	<#else> 
19		<#assign formato_idioma = "yyyy·MM·dd">	 
20	</#if>	 
21	<#assign primero = "primero"> 
22<div class="agendas"> 
23	<#foreach entry in entries>	 
24        <#assign renderer = entry.getAssetRenderer()> 
25		<#assign className = renderer.getClassName()>         
26		<#if className == "com.liferay.journal.model.JournalArticle"> 
27			<#assign journalArticle = renderer.getArticle()>             
28			<#--set ($document = $saxReaderUtil.read($journalArticle.getContent()))--> 
29			<#assign document = saxReaderUtil.read(journalArticle.getContentByLocale(locale.toString()))> 
30			<#assign rootElement = document.getRootElement()>             
31			<#assign laburpena = saxReaderUtil.createXPath("dynamic-element[@name='laburpena']").selectSingleNode(rootElement).getStringValue()>			 
32			<#assign mota = saxReaderUtil.createXPath("dynamic-element[@name='mota']").selectSingleNode(rootElement).getStringValue()>				 
33			<#assign hasieraData = document.valueOf("//dynamic-element[@name='hasieraData']/dynamic-content/text()") /> 
34 
35			<#assign amaieraData = document.valueOf("//dynamic-element[@name='amaieraData']/dynamic-content/text()") /> 
36			 
37			<#assign erakutsiAmaieraData = document.valueOf("//dynamic-element[@name='erakutsiAmaieraData']/dynamic-content/text()") /> 
38 
39			<#assign catService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryService")> 
40			<#assign articleCats = catService.getCategories("com.liferay.journal.model.JournalArticle", getterUtil.getLong(journalArticle.resourcePrimKey))>			 
41			<#assign enlace = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, entry)>	 
42			<#if assetLinkBehavior == "viewInPortlet"> 
43				<#assign enlace = renderer.getURLViewInContext(renderRequest, renderResponse, enlace)>			 
44			</#if>		 
45			<div class="agenda ${primero} ${mota}">  
46				<div class="fechas"> 
47				    <#if hasieraData!=""> 
48    				    <#assign parts = hasieraData?split("-")> 
49            			<#assign calM = parts[1]+""> 
50            			<#if calM?substring(0, 1)=="0"> 
51            				<#assign calM = calM?substring(1)> 
52            			</#if> 
53            			<#assign calM = calM?number> 
54    					<span class="fecha_wrapper"> 
55    						<span class="dia">${parts[2]}</span> 
56    						<span class="mes"><@mes monthNum=calM/></span>   
57					    </span>  
58        			</#if> 
59					<#if erakutsiAmaieraData == "true">				 
60                        <#assign parts2 = amaieraData?split("-")> 
61            			<#assign cal2M = parts2[1]+""> 
62            			<#if cal2M?substring(0, 1)=="0"> 
63            				<#assign cal2M = cal2M?substring(1)> 
64            			</#if> 
65            			<#assign cal2M = cal2M?number> 
66    					<span class="fecha_wrapper">  
67    						<span class="dia">${parts2[2]}</span> 
68    						<span class="mes"><@mes monthNum=cal2M/></span>   
69    					</span> 
70					</#if> 
71				</div>  
72				<div class="datos">  
73					<div class="fecha-categorias"> 
74						<#assign cont = 0>					 
75						<#foreach cat in articleCats>					 
76							<span class="categoria">${cat.getTitle(locale)}</span> 
77							<#assign cont = cont + 1>						 
78							<#if cont &lt; articleCats?size> | </#if>					 
79							</#foreach>					 
80					</div>  
81					<div class="titulo"> 
82						<a href="${enlace}">${journalArticle.getTitle(locale)}</a> 
83					</div> 
84					<div class="descripcion"> 
85						${laburpena} 
86					</div>  
87				</div> 
88			</div>  
89 
90			<#if primero == "primero"> 
91				<#assign primero = "">			 
92			</#if>		 
93		</#if>	 
94	</#foreach> 
95</div> 
96</#if> 
97<#macro mes monthNum>	 
98    <#if monthNum == 1>		 
99        <#if locale == "es_ES">			ENE 
100		<#else>			URT 
101		</#if>	 
102	<#elseif monthNum == 2>		 
103	    <#if locale == "es_ES">			FEB 
104		<#else>			OTS 
105		</#if>	 
106	<#elseif monthNum == 3>		 
107	    <#if locale == "es_ES">			MAR 
108		<#else>			MAR 
109		</#if>	 
110	<#elseif monthNum == 4>		 
111	    <#if locale == "es_ES">			ABR 
112		<#else>			API 
113		</#if>	 
114	<#elseif monthNum == 5>		 
115	    <#if locale == "es_ES">			MAY 
116		<#else>			MAI 
117		</#if>	 
118	<#elseif monthNum == 6>		 
119	    <#if locale == "es_ES">			JUN 
120		<#else>			EKA 
121		</#if>	 
122	<#elseif monthNum == 7>		 
123	    <#if locale == "es_ES">			JUL 
124		<#else>			UZT 
125		</#if>	 
126	<#elseif monthNum == 8>		 
127	    <#if locale == "es_ES">			AGO 
128		<#else>			ABU 
129		</#if>	 
130	<#elseif monthNum == 9>		 
131	    <#if locale == "es_ES">			SEP 
132		<#else>			IRA 
133		</#if>	 
134	<#elseif monthNum == 10>		 
135	    <#if locale == "es_ES">			OCT 
136		<#else>			URR 
137		</#if>	 
138	<#elseif monthNum == 11>		 
139	    <#if locale == "es_ES">			NOV 
140		<#else>			AZA 
141		</#if>	 
142	<#elseif monthNum == 12>		 
143	    <#if locale == "es_ES">			DIC 
144		<#else>			ABE 
145		</#if>	 
146	</#if> 
147</#macro>