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#36734" at line 45, column 25]

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