Breadcrumb

Asset Publisher

An error occurred while processing the template.
The following has evaluated to null or missing:
==> saxReaderUtil.createXPath("dynamic-element[@name='Irudia']/dynamic-element[@name='Irudi_urla']/dynamic-content").selectSingleNode(rootElement)  [in template "20907#20945#45719816" at line 68, column 44]

----
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 imagen_urla = saxReaderUtil.c...  [in template "20907#20945#45719816" at line 68, column 21]
----
1<#assign AssetVocabularyLocalServiceUtil = staticUtil["com.liferay.asset.kernel.service.AssetVocabularyLocalServiceUtil"]> 
2<#assign images_folder = themeDisplay.getPathThemeImages() /> 
3<#assign dlAppServiceUtil = staticUtil["com.liferay.document.library.kernel.service.DLAppServiceUtil"] /> 
4<#assign DLFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService") /> 
5<#assign AssetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") /> 
6<#assign vocId=920242/> 
7<#assign contadorGeneral = 0> 
8<#assign contadorTotal = 0> 
9 
10<#list entries as entry> 
11    <#assign contadorTotal++> 
12</#list> 
13 
14<#if contadorTotal gt 3> 
15    <#assign contadorTotal=3> 
16</#if> 
17 
18<#if locale.getLanguage() == 'es'> 
19    <#assign formato_idioma="dd/MM/yyyy"> 
20    <#assign link="/noticias"> 
21<#else> 
22    <#assign formato_idioma="yyyy/MM/dd"> 
23    <#assign link="/albisteak"> 
24</#if>	 
25 
26<div class="izfe-bg-blue-dark"> 
27    <div class="container pt-4 pb-4" id="actualidad-ultimasnoticias"> 
28        <div class="row"> 
29            <div class="col-12 mb-3"> 
30                <h2 class="text-white font-weight-bold"> 
31                    <@liferay.language key="DGN.ultimas-noticias" /> 
32                </h2> 
33            </div> 
34 
35            <#list entries as curEntry> 
36                <#assign renderer = curEntry.getAssetRenderer() > 
37                <#assign className = renderer.getClassName() > 
38                <#assign journalArticle = renderer.getArticle() > 
39                <#assign document = saxReaderUtil.read(journalArticle.getContentByLocale(locale)) > 
40                <#assign rootElement = document.getRootElement() > 
41                <#assign map_image=""> 
42                <#assign fileEntryId=""> 
43                <#assign imagen=""> 
44                 
45                <#assign titulo = renderer.getTitle(locale)> 
46                <#assign titulofixed=titulo?replace('"','')> 
47                 
48                <#assign resumen = saxReaderUtil.createXPath("dynamic-element[@name='Laburpena']/dynamic-content").selectSingleNode(rootElement).getStringValue() > 
49                <#assign data_string = "" /> 
50                <#if saxReaderUtil.createXPath("dynamic-element[@name='Data']/dynamic-content").selectSingleNode(rootElement)?has_content > 
51                    <#assign data_string = saxReaderUtil.createXPath("dynamic-element[@name='Data']/dynamic-content").selectSingleNode(rootElement).getStringValue() /> 
52                    <#assign Data_DateObj = dateUtil.parseDate("yyyy-MM-dd", data_string, locale)>        
53                    <#assign data_string = dateUtil.getDate(Data_DateObj, formato_idioma, locale)> 
54                </#if> 
55                <#assign imagen = saxReaderUtil.createXPath("dynamic-element[@name='Irudia']/dynamic-content").selectSingleNode(rootElement).getStringValue() > 
56 
57 
58                <#if imagen?has_content > 
59                    <#assign map_image = imagen?eval> 
60                    <#if map_image?has_content && map_image.uuid?has_content && map_image.uuid?? && map_image.groupId?has_content && map_image.groupId??>    
61                        <#assign imgDLFile = DLFileEntryLocalService.fetchDLFileEntryByUuidAndGroupId(map_image.uuid, map_image.groupId?number) /> 
62                        <#assign fileEntryId = imgDLFile.getFileEntryId() /> 
63                    </#if> 
64                </#if> 
65 
66                <#assign imagen_urla = "" /> 
67                <#if saxReaderUtil.createXPath("dynamic-element[@name='Irudia']/dynamic-content").selectSingleNode(rootElement)?has_content > 
68                    <#assign imagen_urla = saxReaderUtil.createXPath("dynamic-element[@name='Irudia']/dynamic-element[@name='Irudi_urla']/dynamic-content").selectSingleNode(rootElement).getStringValue() /> 
69                </#if>  
70 
71 
72                <#assign linkNoticia = "#"> 
73     
74               <#assign categories = AssetCategoryLocalService.getCategories("com.liferay.journal.model.JournalArticle", journalArticle.getResourcePrimKey()) /> 
75                <#assign linkNoticia = renderer.getURLViewInContext(renderRequest, renderResponse, '') > 
76                 
77                <#assign tituloNoticiaLength =  titulofixed?length?number /> 
78                <#if (tituloNoticiaLength gte 150)> 
79                    <#assign altNoticia = titulofixed[0..140]+"..."/> 
80                <#else> 
81                    <#assign altNoticia = titulofixed/> 
82                </#if> 
83 
84                <#if (contadorGeneral==0)> 
85                    <div class="col-12 col-md-6 col-lg-12 mb-5"> 
86                        <div class="row"> 
87                            <div class="col-12 col-lg-6 mb-2"> 
88                                <#if fileEntryId?? && fileEntryId?has_content>  
89                                    <@adaptive_media_image["img"] alt="${altNoticia}" class="w-100 izfe-height-330" fileVersion=dlAppServiceUtil.getFileEntry(fileEntryId?number).getFileVersion()/> 
90                                <#elseif map_image?has_content && map_image.groupId?? && map_image.groupId?has_content && map_image.classPK?? && map_image.classPK?has_content && map_image.title?? && map_image.title?has_content && map_image.uuid?? && map_image.uuid?has_content>  
91                                    <img aria-describedby="${titulo?replace('"',' ')}" alt="${altNoticia}" title="${titulo?replace('"',' ')}" class="w-100 izfe-height-330" src="/documents/${map_image.groupId}/${map_image.classPK}/${map_image.title}/${map_image.uuid}"> 
92                                <#elseif imagen_urla?has_content > 
93                                    <img aria-describedby="${titulo?replace('"',' ')}" alt="${altNoticia}" title="${titulo?replace('"',' ')}" class="w-100 izfe-height-330" src="${imagen_urla}"> 
94                                <#else> 
95                                    <img alt="img-not-found" title="img-not-found" class="w-100 izfe-height-330"src="${images_folder}/izfe/img-not-found.png">  
96                                </#if> 
97                            </div> 
98                            <div class="col-12 col-lg-6 d-flex flex-column"> 
99                                <div class="d-flex align-items-center flex-wrap mb-2"> 
100                                    <#if (data_string?? && data_string?has_content)> 
101                                        <p class="small izfe-semibold text-white m-0 mr-2">${data_string}</p>                                                                                                                                                                                          
102                                    </#if> 
103                                    <#if categories?has_content >                                       
104                                        <#list categories as category> 
105                                            <#assign vocabulary = AssetVocabularyLocalServiceUtil.getAssetVocabulary(category.getVocabularyId()) /> 
106                                            <#if vocabulary.getVocabularyId() == vocId && category.isRootCategory() > 
107                                                <span class="list-inline-item font-weight-bold mr-2"> 
108                                                    <a href="/noticias?category=${category.getCategoryId()}" title="${category.getTitle(locale)}" class="text-nowrap text-yellow text-uppercase"> 
109                                                        <p class="m-0 small">${category.getTitle(locale)}</p> 
110                                                    </a> 
111                                                </span> 
112                                            </#if> 
113                                        </#list> 
114                                    </#if>    
115                                </div>   
116                                <h3 class="izfe-title mb-3"> 
117                                    <a class="izfe-semibold text-white izfe-ultimas-noticias-title" href="${linkNoticia}"> 
118                                        ${curEntry.getTitle(locale)} 
119                                    </a> 
120                                </h3> 
121                                <#if (resumen?? && resumen?has_content)> 
122                                    <p id="izfe-ultimas-noticias-resumen-destacada" class="text-white resumen-mobile">${resumen}</p> 
123                                </#if> 
124                            </div> 
125                        </div> 
126                    </div> 
127                    <#assign contadorGeneral++> 
128                <#elseif (contadorGeneral gte 1) && (contadorGeneral lt 4)> 
129                    <div class="col-12 col-md-6 col-lg-4 mb-3"> 
130                        <div class="row"> 
131                            <div class="col-12 mb-2"> 
132                                <#if fileEntryId?? && fileEntryId?has_content>  
133                                    <@adaptive_media_image["img"] alt="${altNoticia}" class="w-100 izfe-height-250" fileVersion=dlAppServiceUtil.getFileEntry(fileEntryId?number).getFileVersion()/> 
134                                <#elseif map_image?has_content && map_image.groupId?? && map_image.groupId?has_content && map_image.classPK?? && map_image.classPK?has_content && map_image.title?? && map_image.title?has_content && map_image.uuid?? && map_image.uuid?has_content>  
135                                    <img aria-describedby="${titulo?replace('"',' ')}" alt="${altNoticia}" title="${titulo?replace('"',' ')}" class="w-100 izfe-height-250" src="/documents/${map_image.groupId}/${map_image.classPK}/${map_image.title}/${map_image.uuid}"> 
136                                <#elseif imagen_urla?has_content > 
137                                    <img aria-describedby="${titulo?replace('"',' ')}" alt="${altNoticia}" title="${titulo?replace('"',' ')}" class="w-100 izfe-height-250" src="${imagen_urla}"> 
138                                <#else> 
139                                    <img alt="img-not-found" title="img-not-found" class="w-100 izfe-height-250"src="${images_folder}/izfe/img-not-found.png">  
140                                </#if> 
141                            </div> 
142                            <div class="col-12 d-flex flex-column"> 
143                                <div class="d-flex align-items-center flex-wrap mb-2"> 
144                                    <#if (data_string?? && data_string?has_content)> 
145                                        <p class="small izfe-semibold text-white m-0 mr-2">${data_string}</p>                                                                                                                                                                                          
146                                    </#if> 
147                                    <#if categories?has_content >                                        
148                                        <#list categories as category> 
149                                            <#assign vocabulary = AssetVocabularyLocalServiceUtil.getAssetVocabulary(category.getVocabularyId()) /> 
150                                            <#if vocabulary.getVocabularyId() == vocId && category.isRootCategory() > 
151                                                <span class="list-inline-item font-weight-bold m-0 mr-2"> 
152                                                    <a href="/noticias?category=${category.getCategoryId()}" title="${category.getTitle(locale)}" class="text-nowrap text-yellow text-uppercase"> 
153                                                        <p class="m-0 small">${category.getTitle(locale)}</p> 
154                                                    </a> 
155                                                </span> 
156                                            </#if> 
157                                        </#list> 
158                                    </#if>    
159                                </div>   
160                                <h3 class="mb-3 izfe-h3"> 
161                                    <a class="izfe-semibold text-white izfe-ultimas-noticias-title" href="${linkNoticia}"> 
162                                        ${curEntry.getTitle(locale)} 
163                                    </a> 
164                                </h3> 
165                                 <#if (resumen?? && resumen?has_content)> 
166                                    <p class="text-white izfe-ultimas-noticias-resumen">${resumen}</p> 
167                                </#if>                                
168                            </div> 
169                        </div> 
170                    </div> 
171                    <#assign contadorGeneral++> 
172                </#if> 
173            </#list> 
174            <div class="text-center d-flex col-12 justify-content-center mt-4"> 
175                <a href="${link}" class="izfe-btn-white"> 
176                    <@liferay.language key="DGN.ver-todas-noticias" /> 
177                </a> 
178            </div> 
179        </div> 
180    </div> 
181</div> 
182 
183 
184<style> 
185    @media (max-width: 992px){ 
186        #actualidad-ultimasnoticias .izfe-title{ 
187            font-size: 24px; 
188
189        .resumen-mobile{ 
190            font-size: 15px !important; 
191
192
193    @media (min-width: 992px){ 
194        .resumen-mobile{ 
195            font-size: 20px !important; 
196
197
198     
199    /* TAMAÑO DE IMAGENES */ 
200 
201    #actualidad-ultimasnoticias .izfe-height-250, #actualidad-ultimasnoticias .izfe-height-330 { 
202        height: auto; 
203
204    @media (min-width: 768px) and (max-width: 992px){ 
205        #actualidad-ultimasnoticias .izfe-height-330 { 
206            height: 250px; 
207
208
209    @media (min-width: 768px){ 
210        #actualidad-ultimasnoticias .izfe-height-250 { 
211            height: 250px; 
212
213
214    @media (max-width: 768px){ 
215        .izfe-h2 { 
216            font-size: 24px !important 
217
218
219</style> 
220 
221<script> 
222    /*recortarTexto("izfe-ultimas-noticias-title"); 
223    recortarTexto("izfe-ultimas-noticias-resumen"); 
224 
225    function recortarTexto(claseTexto){ 
226        var titulos = document.getElementsByClassName(claseTexto); 
227 
228        for(var i = 0; i < titulos.length; i++){ 
229            if(titulos[i].innerText.length > 150){ 
230                titulos[i].innerText = titulos[i].innerText.substr(0, 150) + "..."; 
231
232
233    }*/ 
234 
235    //RECORTAR TEXTO SIN CORTAR PALABRAS 
236 
237    recortarTexto(160, 'izfe-ultimas-noticias-title', null) 
238    recortarTexto(250, null, 'izfe-ultimas-noticias-resumen-destacada') 
239    recortarTexto(160, 'izfe-ultimas-noticias-resumen', null) 
240 
241 
242    function recortarTexto(limit, classResumen, idResumen){ 
243        if(idResumen == null){ 
244            var resumenes = document.getElementsByClassName(classResumen); 
245        }else{   
246            var resumenes = [document.getElementById(idResumen)]; 
247        }    
248 
249        for(var i = 0; i < resumenes.length; i++){ 
250            var resumen = resumenes[i].innerText; 
251            if(resumen.length > limit){ 
252                if(resumen[limit].toString() != ' '){ 
253                    var indiceRecorte = limit; 
254 
255                    for(var j = limit; j > 0; j--){ 
256                        if(resumen[j] == ' '){ 
257                            indiceRecorte = j; 
258                            break; 
259
260
261                    resumenes[i].innerText = resumen.toString().substr(0, j) + '...'; 
262                }else{ 
263                    resumenes[i].innerText = resumen.toString().substr(0, limit) + '...'; 
264
265
266
267
268 
269</script> 

+ Informazioa

Harpidetu gure buletinetara

 

Aldundiaren berri izan nahi duzu?

Harpidetu gure buletinera

Albisteak astero, egunero edota argitaratu bezain laster jaso ditzakezu.

Harpidetu nahi dut

Asset Publisher

25