S'ha produït un error mentre es processava la plantilla.
The following has evaluated to null or missing:
==> item.not_recurso_documento [in template "10311#10344#NOTICIES" at line 255, column 42]
----
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 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: #elseif item.not_recurso_documento.ge... [in template "10311#10344#NOTICIES" at line 255, column 33]
---- 1<#assign journalArticleLocalService= serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")> 2<#assign assetCategoryServiceUtil= serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryService")> 3<#assign assetTagServiceUtil= serviceLocator.findService("com.liferay.asset.kernel.service.AssetTagService")> 4 5<#assign currentArticle= journalArticleLocalService.getArticle( getterUtil.getLong( groupId), .vars["reserved-article-id"].data)> 6<#assign category= assetCategoryServiceUtil.getCategories("com.liferay.journal.model.JournalArticle", getterUtil.getLong( currentArticle.getResourcePrimKey()))> 7<#assign tag= assetTagServiceUtil.getTags("com.liferay.journal.model.JournalArticle", getterUtil.getLong( currentArticle.getResourcePrimKey()))> 8 9<meta name="og:title" content="${htmlUtil.escape(not_titol.getData())}" /> 10<meta name="og:description" content="${htmlUtil.escape(htmlUtil.stripHtml(stringUtil.trim(not_lead.getData())))}" /> 11<meta name="twitter:title" content="${htmlUtil.escape(not_titol.getData())}" /> 12<meta name="twitter:description" content="${htmlUtil.escape(htmlUtil.stripHtml(stringUtil.trim(not_lead.getData())))}" /> 13<meta name="twitter:card" content="summary_large_image" /> 14 15<section> 16 <article> 17 <#if category?has_content> 18 <span class="tit_img"> 19 <#assign primeraCat=true> 20 <#list category as categoria> 21 <#if categoria.vocabularyId== getterUtil.getLong("32255")> 22 <#if !primeraCat> 23 | 24 </#if> 25 ${categoria.name} 26 <#assign primeraCat=false> 27 </#if> 28 </#list> 29 </span> 30 </#if> 31 32 <iframe src="https://www.facebook.com/plugins/like.php?locale=${locale}&href=${themeDisplay.getURLPortal()}${themeDisplay.getURLCurrent()}&layout=button_count&show_faces=false&width=100&action=like&font=arial&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:21px;float:right;"></iframe> 33 34 <span class="tit_img"><strong>${not_avantitol.getData()}</strong></span> 35 <h2 class="section_cab">${not_titol.getData()}</h2> 36 37 <#if not_img_interior.getSiblings()?has_content> 38 <#assign swiperId = "swiper-" + .vars["reserved-article-id"].data /> 39 <div id="${swiperId}" class="swiper carousel-article-swiper"> 40 <div class="swiper-wrapper"> 41 <#list not_img_interior.getSiblings() as not_img_interior> 42 <#assign imgInteriorURL= ""> 43 <#if not_img_interior?? && not_img_interior.getData()?has_content> 44 <#assign imgInteriorURL= not_img_interior.getData()> 45 </#if> 46 <#if not_img_interior?? && not_img_interior.urlExterna?? && (!imgInteriorURL?has_content || imgInteriorURL?length ==0)> 47 <#assign imgInteriorURL= not_img_interior.urlExterna.getData()> 48 <#if imgInteriorURL?has_content && imgInteriorURL?length gt 0> 49 <meta property="og:image" content="${imgInteriorURL}" /> 50 <meta name="twitter:image" content="${imgInteriorURL}" /> 51 </#if> 52 <#else> 53 <#if imgInteriorURL?has_content && imgInteriorURL?length gt 0> 54 <meta property="og:image" content="https://parcs.diba.cat${imgInteriorURL}" /> 55 <meta name="twitter:image" content="https://parcs.diba.cat${imgInteriorURL}" /> 56 </#if> 57 </#if> 58 59 <#assign altAuxImg= ""> 60 <#if imgInteriorURL?has_content && imgInteriorURL?length gt 0> 61 <#assign urlImgEntry= imgInteriorURL> 62 <#if not_img_interior.not_img_alt.getData()?has_content> 63 <#assign altAuxImg= not_img_interior.not_img_alt.getData()> 64 </#if> 65 66 <div class="swiper-slide text-center"> 67 <#-------------------------------------------------------------------------UNIFICACION PLANTILLAS METAINFO IMATGES INI-------------------------------------------------------------------------> 68 <#if urlImgEntry?has_content> 69 <#----------------------------METAINFO_IMG_GETINFO INI----------------------------> 70 <#assign DLFileEntryUtil= serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")> 71 <#assign uuIdImagen= staticUtil['com.liferay.portal.kernel.util.HttpComponentsUtil'].getParameter( urlImgEntry,"uuid",false)> 72 <#if uuIdImagen?has_content> 73 <#assign groupIdImagen= staticUtil['com.liferay.portal.kernel.util.HttpComponentsUtil'].getParameter( urlImgEntry,"groupId",false)> 74 <#if groupIdImagen?has_content> 75 <#assign current= DLFileEntryUtil.fetchDLFileEntryByUuidAndGroupId(uuIdImagen, getterUtil.getLong( groupIdImagen))!""> 76 </#if> 77 </#if> 78 <#----------------------------METAINFO_IMG_GETINFO FIN----------------------------> 79 80 <#if current?? && current?has_content> 81 <#assign structureId="IMATGES"> 82 <#assign templateId="IMATGES"> 83 84 <#----------------------------METAINFO_EXIST_CONTENT INI----------------------------> 85 <#assign journalArticleLocalService= serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")> 86 <#assign companyId= current.getCompanyId()> 87 <#assign grupoId= current.getGroupId()> 88 <#assign title= current.getDescription()> 89 <#assign andOperator=true> 90 <#assign type="general"> 91 <#assign isEmpty=true> 92 <#assign articles=""> 93 <#assign currentArticle=""> 94 <#assign folders=[]> 95 <#assign articles= journalArticleLocalService.search( getterUtil.getLong( companyId), getterUtil.getLong( grupoId), folders,0,null,null, title,null, type, structureId, templateId,null,null,0,null, andOperator,-1,-1, null)> 96 <#list articles as article> 97 <#if stringUtil.compareToIgnoreCase(article.getTitle(), title)> 98 <#if isEmpty> 99 <#assign isEmpty=false> 100 <#assign currentArticle= article> 101 <#else> 102 <#if currentArticle.getVersion()< article.getVersion()> 103 <#assign currentArticle= article> 104 </#if> 105 </#if> 106 </#if> 107 </#list> 108 <#----------------------------METAINFO_EXIST_CONTENT FIN----------------------------> 109 110 <#if !currentArticle?has_content> 111 <img src="${urlImgEntry}" alt="${altAuxImg}" title="" /> 112 <#if altAuxImg?has_content> 113 <p>${altAuxImg}</p> 114 </#if> 115 <#else> 116 <#----------------------------IMATGES FIN----------------------------> 117 <#assign document= saxReaderUtil.read( currentArticle.getContent())> 118 <#assign img_autor= document.selectSingleNode("/root/dynamic-element[@name= esc.simg_autor esc.s]/dynamic-content[@language-id= esc.s locale esc.s]")> 119 <#assign img_titol= document.selectSingleNode("/root/dynamic-element[@name= esc.simg_titol esc.s]/dynamic-content[@language-id= esc.s locale esc.s]")> 120 <#assign img_alt= document.selectSingleNode("/root/dynamic-element[@name= esc.simg_alt esc.s]/dynamic-content[@language-id= esc.s locale esc.s]")> 121 <#assign img_imatge= document.selectSingleNode("/root/dynamic-element[@name= esc.simg_imatge esc.s]/dynamic-content")> 122 <img src="${img_imatge.getText()}" class="image_border" alt="${img_alt.getText()}" title="${img_alt.getText()}"> 123 <p>${img_titol.getText()}</p> 124 <p>${img_autor.getText()}</p> 125 <#----------------------------IMATGES FIN----------------------------> 126 </#if> 127 <#else> 128 <img src="${urlImgEntry}" alt="${altAuxImg}" title="" /> 129 <#if altAuxImg?has_content> 130 <p>${altAuxImg}</p> 131 </#if> 132 </#if> 133 </#if> 134 <#-------------------------------------------------------------------------UNIFICACION PLANTILLAS METAINFO IMATGES FI-------------------------------------------------------------------------> 135 </div> 136 </#if> 137 </#list> 138 </div> 139 <div class="swiper-button-prev"></div> 140 <div class="swiper-button-next"></div> 141 </div> 142 <style> 143 .swiper-button-next, .swiper-button-prev { 144 color: #006163; 145 } 146 </style> 147 </#if> 148 149 <#if not_data?has_content && not_data.getData()?has_content && not_data.getData()?length == 8> 150 <div class="fecha_noti"> 151 ${not_data.getData()?substring(6,8)}/${not_data.getData()?substring(4,6)}/${not_data.getData()?substring(0,4)} 152 </div> 153 </#if> 154 155 <div class="lead_noti"><strong>${not_lead.getData()}</strong></div> 156 <div class="cos_noti">${not_cos.getData()}</div> 157 158 <div class="icos_noti"> 159 <div class="ico_redes" style="display:flex;justify-content: end"> 160 <span>compartir</span> 161 <#-- AddToAny Button BEGIN --> 162 <div class="a2a_kit a2a_default_style data-a2a-title="${htmlUtil.escape(.vars["reserved-article-title"].data)}"> 163 <a class="a2a_button_google_gmail"></a> 164 <a class="a2a_button_facebook"></a> 165 <a class="a2a_button_pinterest"></a> 166 <a class="a2a_dd" href="https://www.addtoany.com/share"></a> 167 </div> 168 </div> 169 <script> 170 var a2a_config = a2a_config || {}; 171 a2a_config.locale = "es"; 172 </script> 173 <script async src="https://static.addtoany.com/menu/page.js"></script> 174 <script data-senna-track="temporary"> 175 Liferay.on("beforeNavigate", function(event) { location.href = event.path; }); 176 </script> 177 <#-- AddToAny Button END --> 178 </div> 179 180 <div class="bloque_info_izq"> 181 <p>Font de la informació: ${not_fons.getData()}</p> 182 <#if category?has_content> 183 <p>Categoria: 184 <#list category as wcat> 185 <#if wcat.vocabularyId!=401841 && wcat.vocabularyId!=32685> 186 ${wcat.name}, 187 </#if> 188 </#list> 189 </p> 190 </#if> 191 </div> 192 193 <#if tag?? && tag?has_content> 194 <div class="bloque_info_dch"> 195 <p>Tags: 196 <#list tag as wtag> 197 ${wtag.name}, 198 </#list> 199 </p> 200 </div> 201 </#if> 202 203 <div style="clear:both"></div> 204 205 <#assign isRecursos=false> 206 <#if not_recurso?? && not_recurso.getSiblings()?has_content> 207 <#list not_recurso.getSiblings() as item> 208 <#assign img_recurso=""> 209 <#if item.not_recurso_url?? && item.not_recurso_url.getData()?has_content> 210 211 <#if item.getData()?has_content> 212 <#assign img_recurso= item.getData()> 213 <#elseif item.urlExterna4?? && item.urlExterna4.getData()?has_content && item.urlExterna4.getData()?length gt 0> 214 <#assign img_recurso= item.urlExterna4.getData()> 215 </#if> 216 217 <#if !isRecursos> 218 <div class="recursos"> 219 <h3>${languageUtil.get(locale, "resources")}</h3> 220 <#assign isRecursos=true> 221 </#if> 222 223 <p> 224 <#if img_recurso!=""> 225 <img src="${img_recurso}" alt="${item.not_recurso_alt.getData()}"> 226 <#else> 227 <i class="icon-file-text icon-large"></i> 228 </#if> 229 <a href="${item.not_recurso_url.getData()}" title="${item.not_recurso_alt.getData()}" target="${item.not_recurso_tipo.getData()}">${item.not_recurso_alt.getData()}</a> 230 </p> 231 232 <#elseif item.not_recurso_email.getData()?has_content> 233 234 <#if item.getData()?has_content> 235 <#assign img_recurso= item.getData()> 236 <#elseif item.urlExterna4?? && item.urlExterna4.getData()?has_content && item.urlExterna4.getData()?length gt 0> 237 <#assign img_recurso= item.urlExterna4.getData()> 238 </#if> 239 240 <#if !isRecursos> 241 <div class="recursos"> 242 <h3>${languageUtil.get(locale, "resources")}</h3> 243 <#assign isRecursos=true> 244 </#if> 245 246 <p> 247 <#if img_recurso!=""> 248 <img src="${img_recurso}" alt="${item.not_recurso_alt.getData()}"> 249 <#else> 250 <i class="icon-file-text icon-large"></i> 251 </#if> 252 <a href="${item.not_recurso_email.getData()}" title="${item.not_recurso_alt.getData()}" target="${item.not_recurso_tipo.getData()}">${item.not_recurso_alt.getData()}</a> 253 </p> 254 255 <#elseif item.not_recurso_documento.getData()?has_content || (item.not_recurso_documento.urlExterna3?? && item.not_recurso_documento.urlExterna3.getData()?has_content)> 256 257 <#if item.getData()?has_content> 258 <#assign img_recurso= item.getData()> 259 <#elseif item.urlExterna4?? && item.urlExterna4.getData()?has_content && item.urlExterna4.getData()?length gt 0> 260 <#assign img_recurso= item.urlExterna4.getData()> 261 </#if> 262 263 <#if !isRecursos> 264 <div class="recursos"> 265 <h3>${languageUtil.get(locale, "resources")}</h3> 266 <#assign isRecursos=true> 267 </#if> 268 269 <#assign urlDocumento= item.not_recurso_documento.getData()> 270 <#if !item.not_recurso_documento.getData()?has_content || item.not_recurso_documento.getData()?length==0> 271 <#assign urlDocumento= item.not_recurso_documento.urlExterna3.getData()> 272 </#if> 273 274 <p> 275 <#if img_recurso!=""> 276 <img src="${img_recurso}" alt="${item.not_recurso_alt.getData()}"> 277 <#else> 278 <i class="icon-file-text icon-large"></i> 279 </#if> 280 <a href="${urlDocumento}" title="${item.not_recurso_alt.getData()}" target="${item.not_recurso_tipo.getData()}">${item.not_recurso_alt.getData()}</a> 281 </p> 282 </#if> 283 </#list> 284 </#if> 285 286 <#if isRecursos> 287 </div> 288 </#if> 289 </article> 290</section> 291 292<script> 293(function () { 294 "use strict"; 295 296 const SWIPER_CSS = "swiper-bundle.min.css"; 297 const SWIPER_JS = "swiper-bundle.min.js"; 298 const SWIPER_CSS_URL = "https://cdn.jsdelivr.net/npm/swiper@12.1.3/swiper-bundle.min.css"; 299 const SWIPER_JS_URL = "https://cdn.jsdelivr.net/npm/swiper@12.1.3/swiper-bundle.min.js"; 300 const SWIPER_CONTAINER_ID = "swiper-${.vars['reserved-article-id'].data}"; 301 const INIT_FLAG = "__swiperInit_${.vars['reserved-article-id'].data}"; 302 303 function hasAssetByFileName(selector, fileName) { 304 const nodes = document.querySelectorAll(selector); 305 return Array.from(nodes).some(function (node) { 306 const src = node.getAttribute("href") || node.getAttribute("src") || ""; 307 return src.indexOf(fileName) !== -1; 308 }); 309 } 310 311 function ensureSwiperAssets(callback) { 312 if (!hasAssetByFileName('link[rel="stylesheet"][href]', SWIPER_CSS)) { 313 const link = document.createElement("link"); 314 link.rel = "stylesheet"; 315 link.href = SWIPER_CSS_URL; 316 document.head.appendChild(link); 317 } 318 319 if (typeof Swiper !== "undefined") { 320 callback(); 321 return; 322 } 323 324 if (hasAssetByFileName("script[src]", SWIPER_JS)) { 325 const timer = setInterval(function () { 326 if (typeof Swiper !== "undefined") { 327 clearInterval(timer); 328 callback(); 329 } 330 }, 50); 331 332 setTimeout(function () { 333 clearInterval(timer); 334 }, 5000); 335 336 return; 337 } 338 339 const script = document.createElement("script"); 340 script.src = SWIPER_JS_URL; 341 script.onload = callback; 342 document.body.appendChild(script); 343 } 344 345 function initSwiper() { 346 const el = document.getElementById(SWIPER_CONTAINER_ID); 347 if (!el || el.dataset.swiperInit === "true") return; 348 349 el.dataset.swiperInit = "true"; 350 351 new Swiper(el, { 352 loop: true, 353 slidesPerView: 1, 354 snapToSlideEdges: true, 355 navigation: { 356 nextEl: '.swiper-button-next', 357 prevEl: '.swiper-button-prev', 358 }, 359 autoHeight: true, 360 keyboard: true, 361 }); 362 } 363 364 function boot() { 365 if (window[INIT_FLAG]) return; 366 window[INIT_FLAG] = true; 367 ensureSwiperAssets(initSwiper); 368 } 369 370 if (document.readyState === "loading") { 371 document.addEventListener("DOMContentLoaded", boot); 372 } else { 373 boot(); 374 } 375 376 if (window.Liferay) { 377 Liferay.on("allPortletsReady", boot); 378 Liferay.on("endNavigate", boot); 379 } 380})(); 381</script> 