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 27, 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 27, 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        <div class="col-xs-12 col-sm-8 col-md-8"> 
23            <h2 class="titulo-buenas-practicas"> 
24                ${titulo.getData()} 
25            </h2> 
26             
27            <img class="imagen-buenas-practicas" alt="${imagen.imagenalt.getData()}" title="${imagen.imagentitle.getData()}" src="${imagen.getData()}"> 
28             
29            <#if entradilla.getData()?has_content> 
30                <div class="entradilla-buenas-practicas"> 
31                        ${entradilla.getData()} 
32                </div> 
33            </#if> 
34             
35            <div class="contenido-buenas-practicas"> 
36                ${desarrolloContenido.getData()} 
37            </div> 
38             
39            <#if autor.getData()?has_content> 
40                <div class="info-autor-buenas-practicas"> 
41                    ${autor.getData()} 
42                </div> 
43            </#if> 
44        </div> 
45        <div class="col-xs-12 col-sm-4 col-md-4"> 
46            <div class="documentos-relacionados buenas-practicas-docs"> 
47                    <div class="listado-documentos"> 
48                        <#if tituloDocumentoRelacionado?has_content> 
49                            <div class="titulo-documentos"> 
50                                <@liferay.language key='mcmutual.acciones.documentosRelacionados' />    
51                            </div> 
52                        	<#list tituloDocumentoRelacionado.getSiblings() as cur_tituloDocumentoRelacionado> 
53                                <div class="col-xs-12 col-sm-12 col-md-12"> 
54                            	    <div class="col-xs-2 col-sm-2 col-md-2 icono"> 
55                            	        <img alt="Icono documento" title="Icono documento" src="/documents/884597/0/icono_documento.png/0be11f66-3f5d-646d-c3a1-18a5ab3793da?t=1534764088311"/> 
56                            	    </div> 
57                    		        <div class="col-xs-9 col-sm-9 col-md-9 enlace"> 
58                                        <#assign docPrivado = cur_tituloDocumentoRelacionado.docprivado.getData() > 
59                                        <p> 
60                                             
61                                            <a href="${cur_tituloDocumentoRelacionado.linkDocumentoRelacionado.getData()}">${cur_tituloDocumentoRelacionado.getData()}</a> 
62                                        </p> 
63                                        
64                                    </div> 
65                                     <#if docPrivado == '["false"]' > 
66                                            <div class="col-xs-1 col-sm-1 col-md-1 candadito" > 
67                                            </div> 
68                                        </#if> 
69                        		</div> 
70                        	</#list> 
71                        </#if> 
72                    </div> 
73            </div> 
74        </div> 
75    </div> 
76 
77 
78<!--RELATED ASSETS--> 
79 
80<div class="container-conts-relacionados"> 
81    <div class="container"> 
82    <#assign journalArticleAssetEntry = assetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", articlePK) /> 
83    <#assign journalArticleAssetEntryId = journalArticleAssetEntry.getEntryId() /> 
84    <#assign journalArticleRelatedLinks = assetLinkLocalService.getDirectLinks(journalArticleAssetEntryId) /> 
85 
86    <#assign articleStructureId = journalArticle.getDDMStructure().getStructureKey()> 
87    <#assign related_articles = []> 
88    <#list journalArticleRelatedLinks as related_entry> 
89        <#assign relatedAssetEntryId = related_entry.getEntryId2() /> 
90        <#assign relatedAssetEntry = assetEntryLocalService.getEntry(relatedAssetEntryId) /> 
91         
92         
93        <#if validator.equals(relatedAssetEntry.getClassName(), "com.liferay.journal.model.JournalArticle") > 
94            <#assign relatedAssetEntryPrimKey = relatedAssetEntry.getClassPK() /> 
95            <#assign relatedArticle = journalArticleLocalService.getLatestArticle(relatedAssetEntryPrimKey) /> 
96            <#assign related_articles = related_articles + [relatedArticle]> 
97        </#if> 
98    </#list> 
99    <div class="col-xs-12 col-sm-12 col-md-12"> 
100                <div class="titulo-otros-conts-relacionados"> 
101                    <@liferay.language key="mcMutual.mantenteAlDia.OtrasPublicaciones"/> <@liferay.language key='mcmutual.home.buenasPracticas' />    
102                </div> 
103    </div> 
104    <div class="col-xs-12 col-sm-12 col-md-12 fila-articulos"> 
105        <#list related_articles as related_article> 
106            <div class="col-xs-12 col-sm-4 col-md-4 caja-cont-relacionado"> 
107                    <#assign title = related_article.getTitle(locale)> 
108                    <#assign url="/-/"+related_article.getUrlTitle()> 
109                     
110                    <#assign document = saxReaderUtil.read(related_article.getContentByLocale(locale)) > 
111                    <#assign rootElement = document.getRootElement() > 
112                    <#assign titulo = saxReaderUtil.createXPath("dynamic-element[@name='titulo']/dynamic-content").selectSingleNode(rootElement).getStringValue() > 
113                    <#assign imagen = saxReaderUtil.createXPath("dynamic-element[@name='imagen']/dynamic-content").selectSingleNode(rootElement).getStringValue() > 
114                     
115                   
116                    
117            <#if saxReaderUtil.createXPath("dynamic-element[@name='imagen']/dynamic-element[@name='imagenalt']/dynamic-content").selectSingleNode(rootElement) ?? > 
118                <#assign imagenalt = saxReaderUtil.createXPath("dynamic-element[@name='imagen']/dynamic-element[@name='imagenalt']/dynamic-content").selectSingleNode(rootElement).getStringValue() > 
119            <#else> 
120                <#assign imagenalt = "" > 
121             </#if>  
122              
123              <#if saxReaderUtil.createXPath("dynamic-element[@name='imagen']/dynamic-element[@name='imagentitle']/dynamic-content").selectSingleNode(rootElement) ?? > 
124               
125                 <#assign imagentitle = saxReaderUtil.createXPath("dynamic-element[@name='imagen']/dynamic-element[@name='imagentitle']/dynamic-content").selectSingleNode(rootElement).getStringValue() > 
126             <#else> 
127                <#assign imagentitle = "" > 
128             </#if> 
129                     
130                    <img alt="${imagenalt}" title="${imagentitle}" src="${imagen}"> 
131                    <div class="nombre-listado-mantente-al-dia"> 
132                     	<p><@liferay.language key='mcmutual.home.buenasPracticas' />   </p> 
133                    </div> 
134                    <span style="display:none" class="titulo-mantente-dia"> 
135                        ${titulo} 
136                    </span> 
137                     
138                    <a href="${url}"> 
139                    <div class="titulo-listado-mantente-al-dia" id="titulo-listado-mantente-al-dia${idTitulo}"> 
140                    </div> 
141                    </a> 
142                 
143            </div> 
144            <#assign idTitulo = idTitulo + 1 > 
145        </#list> 
146    </div> 
147</div> 
148 
149 
150 
151<script> 
152 
153var titulos = document.getElementsByClassName("titulo-mantente-dia"); 
154for(var i=0; i <= titulos.length; i++){ 
155    var titulo = document.getElementById("titulo-listado-mantente-al-dia"+i); 
156    if(titulos[i].innerHTML != null){ 
157        var cadenaTitulo = titulos[i].innerHTML; 
158        if(cadenaTitulo.length > 95){ 
159            for(var j=1; j <= titulos[i].innerHTML.length; j++){ 
160                if(titulos[i].innerHTML.charAt(j)==" " && j <=95){ 
161                    titulo.innerHTML = titulos[i].innerHTML.substr(0, j); 
162                    titulo.innerHTML += "..."; 
163
164
165        }else{ 
166            document.getElementById("titulo-listado-mantente-al-dia"+i).innerHTML = titulos[i].innerHTML; 
167
168
169
170 
171</script>