Une erreur s'est produite lors du traitement du gabarit.
The following has evaluated to null or missing:
==> stringUtil.shorten(htmlUtil.stripHtml(descrizione), 200) [in template "170938#170973#178671" at line 59, column 34]
----
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: ${stringUtil.shorten(htmlUtil.stripHt... [in template "170938#170973#178671" at line 59, column 32]
---- 1<#assign 2 DLAppLocalServiceUtil = staticUtil["com.liferay.document.library.kernel.service.DLAppLocalServiceUtil"] 3 mkspAPI = serviceLocator.findService("eu.suggesto.suggestogui.service.SuggestoGuiLocalService") 4/> 5 6<section id="strip_list_master"> 7 <div class="container"> 8 <div class="row"> 9 <div class="title_section padding-element col-md-9"> 10 <h3><span>I maestri</span> delle bande Trentine</h3> 11 </div> 12 <div class="search_list col-md-3"> 13 <input name="search" class="field-icon" placeholder="Cerca nell'elenco" id="doc-search" type="search"> 14 <p id="results" class="text-right m-3">Risultati: 1</p> 15 </div> 16 </div> 17 <#if entries?has_content> 18 <#list entries as entry> 19 <#assign 20 entry = entry 21 assetRenderer = entry.getAssetRenderer() 22 className = assetRenderer.getClassName() 23 entryTitle = htmlUtil.escape(assetRenderer.getTitle(themeDisplay.getLocale())) 24 /> 25 26 <#if className == "com.liferay.journal.model.JournalArticle"> 27 <#assign 28 journalArticle = assetRenderer.getArticle() 29 document = saxReaderUtil.read(journalArticle.getContent()) 30 rootElement = document.getRootElement() 31 /> 32 33 <#assign stringSelector = "dynamic-element[@name='foto']"> 34 <#assign xPathSelector = saxReaderUtil.createXPath(stringSelector)> 35 <#if xPathSelector.selectSingleNode(rootElement)??> 36 <#assign foto = xPathSelector.selectSingleNode(rootElement).getStringValue()> 37 <#assign fileEntryId = assetRenderer.getClassPK()> 38 <#assign jsonField = jsonFactoryUtil.createJSONObject(foto)> 39 <#assign fileEntry = DLAppLocalServiceUtil.getFileEntryByUuidAndGroupId(jsonField.uuid, groupId)> 40 <#assign foto = "/documents/" + jsonField.groupId + "/" + fileEntry.folderId + "/" + jsonField.title + "/" + jsonField.uuid> 41 </#if> 42 43 <#assign stringSelector = "dynamic-element[@name='titolo_sezione']/dynamic-element[@name='descrizione_sezione']/dynamic-content[@language-id = '" + themeDisplay.getLocale() + "']"> 44 <#assign xPathSelector = saxReaderUtil.createXPath(stringSelector)> 45 <#if xPathSelector.selectSingleNode(rootElement)??> 46 <#assign descrizione = xPathSelector.selectSingleNode(rootElement).getStringValue()> 47 </#if> 48 49 <#assign viewUrl = mkspAPI.getArticleUrl(groupId, serverName, journalArticle.articleId, localeUtil.fromLanguageId(themeDisplay.getLocale()), localeUtil.fromLanguageId(themeDisplay.getLocale()), "/dettaglio-maestro")> 50 51 <div class="row block_abstract align-items-center"> 52 <div class="col-md-3"> 53 <div class="img_master"> 54 <img src="${foto}" class="img-fluid" alt="${entryTitle}"> 55 </div> 56 </div> 57 <div class="col-md-7 info_master"> 58 <p class="name_master">${entryTitle}</p> 59 <p>${stringUtil.shorten(htmlUtil.stripHtml(descrizione), 200)}</p> 60 </div> 61 <div class="col-md-2 link_detail"> 62 <a href="${viewUrl}">Dettagli</a> <i class="fa fa-arrow-right"></i> 63 </div> 64 </div> 65 </#if> 66 </#list> 67 </#if> 68 </div> 69</section> 70 71<#-- Search filter --> 72<script> 73 $("#doc-search").keyup(function(){ 74 var filter = $(this).val().toLowerCase(), 75 count = 0; 76 77 $(".block_abstract").each(function(){ 78 if($(this).text().search(new RegExp(filter, "i")) < 0){ 79 $(this).addClass("d-none"); 80 }else{ 81 $(this).removeClass("d-none"); 82 count++; 83 } 84 }); 85 86 $("#results").text("Risultati: " + count); 87 }); 88</script>