Publicador de contenidos

Se ha producido un error al procesar la plantilla.
The following has evaluated to null or missing:
==> imagen.imagenalt  [in template "20116#20152#45003" at line 44, column 57]

----
Tip: It's the step after the last dot that caused this error, not those before it.
----
Tip: If the failing expression is known to be 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: ${imagen.imagenalt.getData()}  [in template "20116#20152#45003" at line 44, column 55]
----
1<!-- SERVICES --> 
2<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")> 
3<#assign layoutLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService")> 
4<#assign assetLinkLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService") /> 
5<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") /> 
6<#assign dDMStructureLocalService = serviceLocator.findService("com.liferay.dynamic.data.mapping.service.DDMStructureLocalService") /> 
7<#assign serviceContext = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"].getServiceContext()> 
8<#assign themeDisplay = serviceContext.getThemeDisplay() /> 
9             
10<!-- VARIABLES --> 
11<#assign articleId = .vars['reserved-article-id'].data > 
12<#assign articleTitle = .vars['reserved-article-title'].data > 
13<#assign journalArticle = journalArticleLocalService.getArticle(articleGroupId, articleId) > 
14<#assign articlePK = journalArticle.getResourcePrimKey() > 
15<#assign idTitulo = 0 > 
16 
17 
18 
19 
20<div class="container-buenas-practicas-detalle"> 
21    <div class="container"> 
22     
23        <#assign document = saxReaderUtil.read(journalArticle.getContentByLocale(locale)) > 
24<#assign rootElement = document.getRootElement() > 
25<#assign publicoPrivado = saxReaderUtil.createXPath("dynamic-element[@name='publicoPrivado']/dynamic-content").selectSingleNode(rootElement).getStringValue() > 
26<#assign themeDisplay = serviceContext.getThemeDisplay() /> 
27<#assign link = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent()> 
28 
29     
30        <div class="col-xs-12 col-sm-8 col-md-8"> 
31         
32            <div id="cabecera_impresion" style="display:none"> 
33                <div><img src="/o/ThemePortalAbsentismo/images/company_logo.png" style="width:140px !important;height:80px !important;"></div> 
34                <div>${link}</div> 
35                <hr style="border-top: 2px solid #000000;"/> 
36                <br> 
37            </div> 
38 
39         
40            <h2 class="titulo-buenas-practicas"> 
41                ${titulo.getData()} 
42            </h2> 
43             
44            <img class="imagen-buenas-practicas" alt="${imagen.imagenalt.getData()}" title="${imagen.imagentitle.getData()}" src="${imagen.getData()}"> 
45             
46                <!--INICIO DEL COMPONENTE COMPARTIR E IMPRIMIR-->      
47    <div class="container-col-iconos">	 
48        <p> 
49            <#assign contadorGuia = ""> 
50            <@macrosFreemakerMutual.compartirAbsentismo contadorGuia link articleTitle/> 
51        	<div class="compartirEnlace col-xs-4 col-sm-4 col-md-4 container-icono-guias print" onclick="imprimir()"></div> 
52    	</p> 
53    	</br> 
54    </div> 
55         
56    <script>															 
57    	var mostrar = 0; 
58    	function compartir(){ 
59    		if(mostrar == 0){ 
60    			$("#compartir").show(); 
61    			mostrar = 1; 
62    		}else{ 
63    			$("#compartir").hide(); 
64    			mostrar = 0; 
65
66
67    	function imprimir(){ 
68    			window.print(); 
69
70    </script> 
71    <!--FIN DEL COMPONENTE COMPARTIR E IMPRIMIR--> 
72 
73             
74            <#if entradilla.getData()?has_content> 
75                <div class="entradilla-buenas-practicas"> 
76                        ${entradilla.getData()} 
77                </div> 
78            </#if> 
79             
80            <div class="contenido-buenas-practicas"> 
81                ${desarrolloContenido.getData()} 
82            </div> 
83             
84            <#if autor.getData()?has_content> 
85                <div class="info-autor-buenas-practicas"> 
86                    ${autor.getData()} 
87                </div> 
88            </#if> 
89        </div> 
90        <div class="col-xs-12 col-sm-4 col-md-4"> 
91            <div class="documentos-relacionados buenas-practicas-docs"> 
92                    <div class="listado-documentos"> 
93                        <#if tituloDocumentoRelacionado?has_content> 
94                            <div class="titulo-documentos"> 
95                                <@liferay.language key='mcmutual.acciones.documentosRelacionados' />    
96                            </div> 
97                        	<#list tituloDocumentoRelacionado.getSiblings() as cur_tituloDocumentoRelacionado> 
98                                <div class="col-xs-12 col-sm-12 col-md-12"> 
99                            	    <div class="col-xs-2 col-sm-2 col-md-2 icono"> 
100                            	        <img alt="Icono documento" title="Icono documento" src="/documents/884597/0/icono_documento.png/0be11f66-3f5d-646d-c3a1-18a5ab3793da?t=1534771288311"/> 
101                            	    </div> 
102                    		        <div class="col-xs-9 col-sm-9 col-md-9 enlace"> 
103                                        <#assign docPrivado = cur_tituloDocumentoRelacionado.docprivado.getData() > 
104                                        <p> 
105                                             
106                                            <a href="${cur_tituloDocumentoRelacionado.linkDocumentoRelacionado.getData()}">${cur_tituloDocumentoRelacionado.getData()}</a> 
107                                        </p> 
108                                        
109                                    </div> 
110                                     <#if docPrivado == '["false"]' > 
111                                            <div class="col-xs-1 col-sm-1 col-md-1 candadito" > 
112                                            </div> 
113                                        </#if> 
114                        		</div> 
115                        	</#list> 
116                        </#if> 
117                    </div> 
118            </div> 
119        </div> 
120    </div> 
121 
122 
123<!--RELATED ASSETS--> 
124 
125<div class="container-conts-relacionados"> 
126    <div class="container"> 
127   <#assign articleStructureId = journalArticle.getDDMStructure().getStructureKey()> 
128	 
129    <#assign related_articles = []> 
130	 
131    <#assign related_articles = journalArticleLocalService.getArticlesByStructureId(groupId, articleStructureId, -1, -1, null)>		 
132     <!-- quitar el articulo actual para que no salga como relacionado --> 
133     <#assign related_articles_others = []> 
134     <#list related_articles as related_entry> 
135       <#if !validator.equals(related_entry.getArticleId(), articleId) > 
136            <#assign related_articles_others = related_articles_others + [related_entry]> 
137        </#if> 
138     </#list> 
139     <#assign related_articles_size = related_articles_others?size> 
140 
141    <div class="col-xs-12 col-sm-12 col-md-12"> 
142                <div class="titulo-otros-conts-relacionados"> 
143                    <@liferay.language key="mcMutual.mantenteAlDia.OtrasPublicaciones"/> <@liferay.language key='mcmutual.home.buenasPracticas' />    
144                </div> 
145    </div> 
146     
147    <#assign _rand = 0.36 > 
148    <#assign numElementosMostrar = 3 > 
149    <#assign inicio = rand(0, (related_articles_size-numElementosMostrar)) > 
150    <#assign fin = inicio + (numElementosMostrar - 1) > 
151 
152 
153     
154    <div class="col-xs-12 col-sm-12 col-md-12 fila-articulos"> 
155         <#list related_articles_others[inicio..fin] as related_article> 
156            <div class="col-xs-12 col-sm-4 col-md-4 caja-cont-relacionado"> 
157                    <#assign title = related_article.getTitle(locale)> 
158                    <#assign url="/-/"+related_article.getUrlTitle()> 
159                     
160                    <#assign document = saxReaderUtil.read(related_article.getContentByLocale(locale)) > 
161                    <#assign rootElement = document.getRootElement() > 
162                    <#assign titulo = saxReaderUtil.createXPath("dynamic-element[@name='titulo']/dynamic-content").selectSingleNode(rootElement).getStringValue() > 
163                    <#assign imagen = saxReaderUtil.createXPath("dynamic-element[@name='imagen']/dynamic-content").selectSingleNode(rootElement).getStringValue() > 
164                     
165                   
166                    
167            <#if saxReaderUtil.createXPath("dynamic-element[@name='imagen']/dynamic-element[@name='imagenalt']/dynamic-content").selectSingleNode(rootElement) ?? > 
168                <#assign imagenalt = saxReaderUtil.createXPath("dynamic-element[@name='imagen']/dynamic-element[@name='imagenalt']/dynamic-content").selectSingleNode(rootElement).getStringValue() > 
169            <#else> 
170                <#assign imagenalt = "" > 
171             </#if>  
172              
173              <#if saxReaderUtil.createXPath("dynamic-element[@name='imagen']/dynamic-element[@name='imagentitle']/dynamic-content").selectSingleNode(rootElement) ?? > 
174               
175                 <#assign imagentitle = saxReaderUtil.createXPath("dynamic-element[@name='imagen']/dynamic-element[@name='imagentitle']/dynamic-content").selectSingleNode(rootElement).getStringValue() > 
176             <#else> 
177                <#assign imagentitle = "" > 
178             </#if> 
179                     
180                    <img alt="${imagenalt}" title="${imagentitle}" src="${imagen}"> 
181                    <div class="nombre-listado-mantente-al-dia"> 
182                     	<p><@liferay.language key='mcmutual.home.buenasPracticas' />   </p> 
183                    </div> 
184                    <span style="display:none" class="titulo-mantente-dia"> 
185                        ${titulo} 
186                    </span> 
187                     
188                    <a href="${url}"> 
189                    <div class="titulo-listado-mantente-al-dia" id="titulo-listado-mantente-al-dia${idTitulo}"> 
190                    </div> 
191                    </a> 
192                 
193            </div> 
194            <#assign idTitulo = idTitulo + 1 > 
195        </#list> 
196    </div> 
197</div> 
198 
199 
200 
201<script> 
202 
203var titulos = document.getElementsByClassName("titulo-mantente-dia"); 
204for(var i=0; i <= titulos.length; i++){ 
205    var titulo = document.getElementById("titulo-listado-mantente-al-dia"+i); 
206    if(titulos[i].innerHTML != null){ 
207        var cadenaTitulo = titulos[i].innerHTML; 
208        if(cadenaTitulo.length > 95){ 
209            for(var j=1; j <= titulos[i].innerHTML.length; j++){ 
210                if(titulos[i].innerHTML.charAt(j)==" " && j <=95){ 
211                    titulo.innerHTML = titulos[i].innerHTML.substr(0, j); 
212                    titulo.innerHTML += "..."; 
213
214
215        }else{ 
216            document.getElementById("titulo-listado-mantente-al-dia"+i).innerHTML = titulos[i].innerHTML; 
217
218
219
220 
221</script> 
222 
223<#function rand min max> 
224  <#local now = .now?long?c /> 
225  <#local randomNum = _rand + ("0." + now?substring(now?length-1) + now?substring(now?length-2))?number /> 
226  <#if (randomNum > 1)> 
227    <#assign _rand = randomNum % 1 /> 
228  <#else> 
229    <#assign _rand = randomNum /> 
230  </#if> 
231  <#return (min + ((max - min) * _rand))?round /> 
232</#function>