Si è verificato un errore nell'elaborarazione del modello.
The following has evaluated to null or missing:
==> portletPreferences['queryValues0'] [in template "20096#20121#93404" at line 39, column 37]
----
Tip: It's the final [] step 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: #assign categoriesConfig = portletPre... [in template "20096#20121#93404" at line 39, column 9]
----
1<#assign error = false />
2<#assign errorMessage = "" />
3
4<#assign structureService = serviceLocator.findService("it.inera.structure.service.StructureService")>
5<#assign siteBaseUrl = structureService.getSiteBaseUrl(themeDisplay)>
6<#assign jac = serviceLocator.findService("it.inera.journalarticleconverter.service.JournalArticleConverter")>
7<#assign dlFileEntryService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")>
8<#assign dlAppLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppLocalService")>
9<#assign notiziaStructureId = structureService.getStructureNotiziaId()>
10<#assign tipiNotiziaVocabularyId = structureService.getVocabularyTipinotiziaId()>
11
12<#if entries?has_content>
13 <#list entries as curEntry>
14 <#assign assetRenderer = curEntry.getAssetRenderer()/>
15 <#if validator.isNotNull(assetRenderer)>
16 <#assign className = assetRenderer.getClassName() />
17 <#if className == "com.liferay.journal.model.JournalArticle">
18 <#assign ja = assetRenderer.getArticle() />
19 <#assign structureId = ja.getDDMStructureId() />
20 <#if structureId != notiziaStructureId>
21 <#assign error = true />
22 <#assign errorMessage = "Il template gestisce solo Web Content di tipo Notizia" />
23 </#if>
24 <#else>
25 <#assign error = true />
26 <#assign errorMessage = "Il template gestisce solo asset di tipo Web Content" />
27 </#if>
28 <#else>
29 <#assign error = true />
30 <#assign errorMessage = "Errore generico" />
31 </#if>
32 </#list>
33<#else>
34 <#assign error = true />
35 <#assign errorMessage = "Nessun contenuto selezionato" />
36</#if>
37
38<#if !error>
39 <#assign categoriesConfig = portletPreferences['queryValues0'] >
40 <#assign categoryConfig = "" >
41 <#if categoriesConfig?has_content>
42 <#assign categoryConfig = "/-/category_novita/" + categoriesConfig[0] >
43 </#if>
44
45 <section id="novita">
46 <div class="py-3">
47 <div class="container">
48 <div class="row row-title pt-md-5">
49 <div class="col-12">
50 <h2 class="text-secondary border-bottom pb-2 pb-lg-3 mt-lg-5"><@liferay.language key="argomento.secnovita.novita" /></h2>
51 </div>
52 </div>
53 <div class="row pt-4 mt-lg-2 pb-lg-4">
54
55 <#list entries as curEntry>
56 <#assign assetRenderer = curEntry.getAssetRenderer()/>
57 <#assign ja = assetRenderer.getArticle() />
58 <#assign structureId = ja.getDDMStructureId() />
59 <#assign notizia = jac.getNotizia(ja) />
60 <#assign vocabularies = notizia.getCategories() />
61
62 <#assign urlTitle = notizia.getUrlTitle() />
63 <#assign titolo = notizia.getTitolo() />
64 <#assign displayDate = notizia.getData() />
65 <#assign sottotitolo = notizia.getAbstract_() />
66 <#assign immagineprincipale = notizia.getImmagineprincipale() >
67
68 <#if vocabularies?? && vocabularies?has_content >
69 <#list vocabularies as vocabularyId, categories>
70 <#if categories?? && categories?has_content && vocabularyId == tipiNotiziaVocabularyId >
71 <#list categories as category>
72 <#assign tipoNotizia = category.getTitle(locale) >
73 <#assign paginaTipoNotizia = category.getDescription(locale)?replace('<[^>]+>','','r') >
74 </#list>
75 </#if>
76 </#list>
77 </#if>
78
79 <div class="col-12 col-md-6 col-lg-4">
80 <div class="card-wrapper">
81 <div class="card card-img no-after rounded border <#if immagineprincipale?? && immagineprincipale.getImmagine()?? && immagineprincipale.getImmagine().getUrl()?? && immagineprincipale.getImmagine().getUrl()?has_content>sm-row</#if>">
82 <#if immagineprincipale?? && immagineprincipale.getImmagine()?? && immagineprincipale.getImmagine().getUrl()?? && immagineprincipale.getImmagine().getUrl()?has_content>
83 <div class="img-responsive-wrapper">
84 <div class="img-responsive img-responsive-panoramic">
85 <#assign fileEntryImg = dlFileEntryService.getDLFileEntry(immagineprincipale.getImmagine().getFileEntryId()?number) />
86 <#assign fileVersionImg = dlAppLocalService.getFileVersion(fileEntryImg.getFileVersion().getFileVersionId()) />
87 <figure class="img-wrapper">
88 <#assign titoloImmagine = "Immagine principale"/>
89 <#if immagineprincipale.getTitolo()?? && immagineprincipale.getTitolo()?has_content>
90 <#assign titoloImmagine = immagineprincipale.getTitolo()/>
91 <#else>
92 <#assign titoloImmagine = immagineprincipale.getImmagine().getAlt()/>
93 </#if>
94 <@adaptive_media_image.img fileVersion=fileVersionImg title="${titoloImmagine}" alt="${immagineprincipale.getImmagine().getAlt()}" />
95 </figure>
96 </div>
97 </div>
98 </#if>
99
100 <div class="card-body p-4">
101 <div class="category-top">
102 <a title="${tipoNotizia}" class="text-decoration-none fw-semibold" href="${paginaTipoNotizia}" data-element="news-category-link" >${tipoNotizia}</a>
103 <span class="data text-secondary">${displayDate?string["dd/MM/yyyy"]}</span>
104 </div>
105 <h3 class="mb-0">
106 <a href="${siteBaseUrl}/-/${urlTitle}" class="text-decoration-none" data-element="news-link">
107 ${titolo}
108 </a>
109 </h3>
110 <p class="pt-3 text-secondary">${sottotitolo}</p>
111 </div>
112 </div>
113 </div>
114 </div>
115 </#list>
116
117 </div>
118
119 <div class="row">
120 <div class="col-12 col-lg-3 offset-lg-9">
121 <a href="${siteBaseUrl}/novita${categoryConfig}" class="btn btn-primary text-button w-100" title="<@liferay.language key="argomento.secnovita.tutti" />"><@liferay.language key="argomento.secnovita.tutti" /></a>
122 </div>
123 </div>
124
125 </div>
126 </div>
127 </section>
128<#else>
129 <section id="news">
130 <div class="section section-muted pb-90 pb-lg-50 px-lg-5 pt-0">
131 <div class="container">
132 <h2 class="text-secondary pt-5 mb-4"><@liferay.language key="argomento.secnovita.novita" /></h2>
133 <div class="row g-4">
134 <i>${errorMessage}</i>
135 </div>
136 </div>
137 </div>
138 </section>
139</#if>