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