Recomanació. Els Dics
S'ha produït un error mentre es processava la plantilla.
The following has evaluated to null or missing:
==> journalContentUtil.getContent(groupIdLong,relatedArticle.articleId,relatedArticleTemplateId,viewMode,languageId,themeDisplay) [in template "10901#10934#RECOMANACIÓ_DETALL" at line 100, column 99]
----
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: ${journalContentUtil.getContent(group... [in template "10901#10934#RECOMANACIÓ_DETALL" at line 100, column 97]
---- 1<#assign id = .vars['reserved-article-id'].data> 2<script type="text/javascript"> 3 4 function saveEntryAction(formName){ 5 6 document.getElementById(formName).articleId.value=${id}; 7 document.getElementById(formName).groupId.value=${getterUtil.getLong(groupId)}; 8 document.getElementById(formName).submit(); 9 10 } 11 12</script> 13 14 15<#assign urltitle = .vars['reserved-article-url-title'].data> 16 17<#assign assetEntrySvc = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService")> 18<#assign articleSvc = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")> 19<#assign classNameSvc = serviceLocator.findService("com.liferay.portal.kernel.service.ClassNameLocalService")> 20<#assign geniusGroupId="6200569"> 21<#if (scopeGroupId?number != geniusGroupId?number)> 22 <div class="recommendationDetail d-flex flex-column"> 23 <div class="recommendationData"> 24 <div class="recommendationValoraciones"> 25 26 <#assign articleClass = classNameSvc.getClassName("com.liferay.journal.model.JournalArticle")> 27 28 <#assign articleId = id> 29 30 <#assign groupIdLong = getterUtil.getLong(groupId)> 31 32 <#assign article = articleSvc.getArticle(groupIdLong, articleId)> 33 34 <#if (!article?has_content )> 35 <#assign groupSvc = serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService")> 36 <#assign groupIdLong = getterUtil.getLong(groupSvc.getCompanyGroup(companyId).getGroupId())> 37 <#assign article = articleSvc.getArticle(groupIdLong, articleId)> 38 </#if> 39 40 <#if (article?has_content)> 41 42 <#assign assetEntry = assetEntrySvc.fetchEntry(articleClass.getClassName(), article.getResourcePrimKey())> 43 44 <#assign assetEntryId = assetEntry.getEntryId()> 45 <#assign assetEntryIdLong = getterUtil.getLong(assetEntryId)> 46 47 <#assign assetLinkSvc = serviceLocator.findService("com.liferay.asset.link.service.AssetLinkLocalService")> 48 49 <#if (assetLinkSvc?has_content)> 50 <#assign assetLinks = assetLinkSvc.getDirectLinks(assetEntryIdLong)> 51 <#list assetLinks as assetLink> 52 53 <#if (getterUtil.getLong(assetLink.getEntryId1()) == assetEntryIdLong)> 54 <#assign assetLinkEntry = assetEntrySvc.getEntry(getterUtil.getLong(assetLink.getEntryId2()))> 55 <#else> 56 <#assign assetLinkEntry = assetEntrySvc.getEntry(getterUtil.getLong(assetLink.getEntryId1()))> 57 </#if> 58 59 <#assign classPK = assetLinkEntry.getClassPK()> 60 61 <#assign relatedArticle = articleSvc.getLatestArticle(getterUtil.getLong(classPK))> 62 63 <#if (relatedArticle?has_content)> 64 65 <#assign relatedStructureId = relatedArticle.getDDMStructureKey()> 66 67 <#if (relatedStructureId == "DOCUMENT_RECOMANAT" )> 68 <#assign relatedArticleTemplateId = "RECOMANACIÓ_" + relatedStructureId> 69 <#else> 70 <#assign relatedArticleTemplateId = "RECOMANACIÓ_ALTRE"> 71 </#if> 72 73 <#assign languageId = localeUtil.toLanguageId(locale)> 74 75 <#if image.getData()?length != 0> 76 <#assign imgSrc = image.getData()> 77 <#else> 78 <#assign imgSrc = image.urlExterna.getData()> 79 </#if> 80 81 82 <meta property="og:url" content="${themeDisplay.getPortalURL()}${themeDisplay.getURLCurrent()}"/> 83 <meta property="og:type" content="article" /> 84 <meta property="og:description" content="${stringUtil.shorten(htmlUtil.stripHtml(recomendationText.getData()),250)}" /> 85 <meta property="og:title" content="${title.getData()}" /> 86 <meta property="og:image" content="${imgSrc}" /> 87 <meta property="og:image:width" content="200" /> 88 <meta property="og:image:height" content="300" /> 89 <meta name="twitter:card" content="summary_large_image" /> 90 <meta name="twitter:card" content="summary" /> 91 <meta name="twitter:title" content="${title.getData()}" /> 92 <meta name="twitter:description" content="${stringUtil.shorten(htmlUtil.stripHtml(recomendationText.getData()),250)}" /> 93 <meta name="twitter:url" content="${themeDisplay.getPortalURL()}${themeDisplay.getURLCurrent()}"/> 94 <meta name="twitter:image" content="${imgSrc}" /> 95 96 97 98 ${journalContentUtil.getContent(groupIdLong,relatedArticle.articleId,relatedArticleTemplateId,viewMode,languageId,themeDisplay)} 99 100 101 102 103 <#else> 104 105 <p style="display:none">No se ha recuperado ningún artículo con el id [${articleConnection.secondaryId}]</p> 106 107 </#if> 108 109 110 111 </#list> 112 </#if> 113 114 <#else> 115 116 <p style="display:none">Problema al recuperar el artículo del grupo [$groupIdLong], con articleId [$articleId]</p> 117 118 </#if> 119 120 121 122 <#assign idUsuario = getterUtil.getLong(themeDisplay.getUserId())> 123 <#if (idUsuario gt 0)> 124 <#assign userService =serviceLocator.findService("com.liferay.portal.kernel.service.UserLocalService")> 125 <#assign user =userService.getUserById(getterUtil.getLong(themeDisplay.getUserId()))> 126 </#if> 127 128 </div> 129 130 131 132 133 </div> 134 135 <div class="recomanacio_detall"> 136 137 ${recomendationText.data} 138 139 </div> 140 141 <#if (article?has_content)> 142 <#assign fechaModified=assetEntry.getModifiedDate()> 143 <span class="modificationDate">${fechaModified?string("dd/MM/yyyy")}</span> 144 145 146 </#if> 147 <div class="valoraciones"> 148 149 150 <#assign titolRecomanacio=languageUtil.get(locale, title.getData())> 151 <#if (relatedArticle?has_content)> 152 <#assign titolRecomanacio=languageUtil.get(locale, relatedArticle.title)> 153 </#if> 154 <div class="py-2 a2a_kit a2a_kit_size_32 a2a_default_style" data-a2a-url="https://bibliotecavirtual.diba.cat/detall-recomanacio/-/contingut/${groupId}/${urltitle}" data-a2a-title="${title.getData()}" style="background-color: #e6e6e6;display: inline-block;" data-a2a-icon-color="#e6e6e6,#000000"> 155 <!-- AddToAny BEGIN --> 156 <div class="a2a_kit a2a_kit_size_32 a2a_default_style"> 157 <a class="a2a_dd" href="https://www.addtoany.com/share"></a> 158 <a class="a2a_button_email"></a> 159 <a class="a2a_button_print"></a> 160 </div> 161 162<script> 163var a2a_config = a2a_config || {}; 164a2a_config.onclick = false; 165a2a_config.locale = "es"; 166 167</script> 168 169<script async src="https://static.addtoany.com/menu/page.js"></script> 170 171 172 <#if (validator.isNotNull(user) && !user.isDefaultUser())> 173 <form name="fmGuardarRecomendacion${id}" action="" method="post"> 174 <input type="button" class="botoDesar" name="save" value="Desa" onclick="javascript:saveEntryAction("fmGuardarRecomendacion${id}");"/> 175 </form> 176 </#if> 177 178 </div> 179 180 </div> 181 182<#else> 183 184 <div class="recommendationDetail"> 185 186 <div class="recommendationData"> 187 188 <div class="recommendationValoraciones"> 189 190 191 192 193 194 195 196 197 198 199 200 <#assign articleClass = classNameSvc.getClassName("com.liferay.journal.model.JournalArticle")> 201 202 <#assign articleId = id> 203 204 <#assign groupIdLong = getterUtil.getLong(groupId)> 205 206 <#assign article = articleSvc.getArticle(groupIdLong, articleId)> 207 208 209 <#if ( !article?has_content )> 210 <#assign groupSvc = serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService")> 211 <#assign groupIdLong = getterUtil.getLong(groupSvc.getCompanyGroup(companyId).getGroupId())> 212 <#assign article = articleSvc.getArticle(groupIdLong, articleId)> 213 </#if> 214 215 216 <#if (article?has_content)> 217 218 <#assign assetEntry = assetEntrySvc.fetchEntry(articleClass.getClassName(), article.getResourcePrimKey())> 219 220 <#assign assetEntryId = assetEntry.getEntryId()> 221 <#assign assetEntryIdLong = getterUtil.getLong(assetEntryId)> 222 223 <#assign assetLinkSvc = serviceLocator.findService("com.liferay.asset.link.service.AssetLinkLocalService")> 224 225 <#if (assetLinkSvc?has_content)> 226 227 <#assign assetLinks = assetLinkSvc.getDirectLinks(assetEntryIdLong)> 228 <#list assetLinks as assetLink> 229 <#if (getterUtil.getLong(assetLink.getEntryId1()) == assetEntryIdLong)> 230 <#assign assetLinkEntry = assetEntrySvc.getEntry(getterUtil.getLong(assetLink.getEntryId2()))> 231 <#else> 232 <#assign assetLinkEntry = assetEntrySvc.getEntry(getterUtil.getLong(assetLink.getEntryId1()))> 233 </#if> 234 235 <#assign classPK = assetLinkEntry.getClassPK()> 236 237 <#assign relatedArticle = articleSvc.getLatestArticle(getterUtil.getLong(classPK))> 238 239 <#if (relatedArticle?has_content)> 240 241 <#assign relatedStructureId = relatedArticle.getDDMStructureKey()> 242 243 <#if (relatedStructureId == "DOCUMENT_RECOMANAT" )> 244 <#assign relatedArticleTemplateId = "RECOMANACIÓ_" + relatedStructureId> 245 <#else> 246 <#assign relatedArticleTemplateId = "RECOMANACIÓ_ALTRE"> 247 </#if> 248 249 <#assign languageId = localeUtil.toLanguageId(locale)> 250 251 <#if image.getData()?has_content && image.getData()?length != 0> 252 <#assign imgSrc = image.getData()> 253 <#else> 254 <#assign imgSrc = image.urlExterna.getData()> 255 </#if> 256 257 258 ${journalContentUtil.getContent(groupIdLong,relatedArticle.articleId,relatedArticleTemplateId,viewMode,languageId,themeDisplay)} 259 <#else> 260 <p style="display:none">No se ha recuperado ningún artículo con el id [${articleConnection.secondaryId}]</p> 261 </#if> 262 </#list> 263 </#if> 264 265 <#else> 266 267 <p style="display:none">Problema al recuperar el artículo del grupo [${groupIdLong}], con articleId [${articleId}]</p> 268 269 </#if> 270 271 272 273 274 275 276 277 278 279 <#assign idUsuario = getterUtil.getLong(themeDisplay.getUserId())> 280 <#if (idUsuario gt 0)> 281 <#assign userService =serviceLocator.findService("com.liferay.portal.kernel.service.UserLocalService")> 282 <#assign user = userService.getUserById(getterUtil.getLong(themeDisplay.getUserId()))> 283 </#if> 284 285 </div> 286 287 <div class="valoraciones"> 288 289 290 291 <!-- AddThis Button BEGIN --> 292 293 <#assign titolRecomanacio=languageUtil.get(locale, title.getData())> 294 295 <div class="w-100 py-2 a2a_kit a2a_kit_size_32 a2a_default_style" data-a2a-url="https://bibliotecavirtual.diba.cat/detall-recomanacio/-/contingut/${groupId}/${urltitle}" data-a2a-title="${title.getData()}" style="background-color: #e6e6e6;display: inline-block;" data-a2a-icon-color="#e6e6e6,#000000"> 296 <!-- AddToAny BEGIN --> 297 <div class="a2a_kit a2a_kit_size_32 a2a_default_style"> 298 <a class="a2a_dd" href="https://www.addtoany.com/share"></a> 299 <a class="a2a_button_email"></a> 300 <a class="a2a_button_print"></a> 301 </div> 302 303<script> 304var a2a_config = a2a_config || {}; 305a2a_config.onclick = false; 306a2a_config.locale = "es"; 307 308</script> 309 310<script async src="https://static.addtoany.com/menu/page.js"></script> 311</div> 312 313 314 315 316 <!-- AddThis Button END --> 317 318 319 320 321 322 323 <#if (validator.isNotNull(user) && !user.isDefaultUser()) > 324 <form name="fmGuardarRecomendacion${id}" action="" method="post"> 325 326 <input type="button" class="botoDesar" name="save" value="Desa" onclick="javascript:saveEntryAction("fmGuardarRecomendacion${id}");"/> 327 328 </form> 329 </#if> 330 331 </div> 332 333 334 </div> 335 336 <div class="recomanacio_detall"> 337 338 ${recomendationText.getData()} 339 340 </div> 341 342 <#if (article?has_content)> 343 <#assign fechaModified=assetEntry.getModifiedDate()> 344 <span class="modificationDate">${fechaModified?string("dd/MM/yyyy")}</span> 345 346 347 </#if> 348 349 </div> 350</#if> 






