The following has evaluated to null or missing: ==> cardImageJson.groupId [in template "20096#20121#CONFINDUSTRIA-ARTICOLO-REDAZIONALE" at line 26, column 22] ---- 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: cardImageGroupId = cardImageJson.groupId [in template "20096#20121#CONFINDUSTRIA-ARTICOLO-REDAZIONALE" at line 26, column 3] ----
1<#include "${templatesPath}/MACRO-CONFINDUSTRIA" />
2
3<#assign journalLocalService = serviceLocator.findService('com.liferay.journal.service.JournalArticleLocalService') />
4<#assign assetEntryLocalService = serviceLocator.findService('com.liferay.asset.kernel.service.AssetEntryLocalService') />
5
6<#assign
7 articleid = .vars['reserved-article-id'].data
8 journalArticle = journalLocalService.getArticle(groupId, articleid)
9 classPK = journalArticle.resourcePrimKey?number
10 assetEntry = assetEntryLocalService.getEntry('com.liferay.journal.model.JournalArticle',classPK)
11 categories = assetEntry.getCategories()
12 areeCategories = confindustria_template_tool.getAreeTematiche(categories)
13 materieCategories = confindustria_template_tool.getMaterie(categories)
14 tags = assetEntry.getTags()
15 viewCount = assetEntry.viewCount
16
17 displaydate = journalArticle.getDisplayDate()?datetime
18 displaydate = confindustria_template_tool.getDateFormattedDetailBy(displaydate?string("dd MMMMM yyyy"), "dd MMMMM yyyy", locale)
19
20 item = confindustria_template_tool.getDDMJournalArticleValuesMap(classPK, locale)
21 title=item.title.value
22 abstract=item.abstract.value
23 text=item.text.value
24 cardImageOri = item.image.value
25 cardImageJson = jsonFactoryUtil.createJSONObject(cardImageOri)
26 cardImageGroupId = cardImageJson.groupId
27 cardImageUuid = cardImageJson.uuid
28 cardImageWidth = cardImageJson.width
29 cardImageHeight = cardImageJson.height
30 coverImage = confindustria_template_tool.getDDMImageURL(cardImageUuid,cardImageGroupId?number,themeDisplay)
31 fileEntryImage = confindustria_template_tool.getFileEntry(cardImageUuid,cardImageGroupId?number,themeDisplay)
32 entryId = fileEntryImage.getFileEntryId()
33 fileName = fileEntryImage.getFileName()
34/>
35
36<#assign
37 contentVisible = false
38 publicArticle=item.public.value
39/>
40<#if publicArticle?boolean == true>
41 <#assign contentVisible = true/>
42<#elseif isLoggedIn == true>
43 <#assign contentVisible = confindustria_template_tool.canViewContent(themeDisplay.getUserId(),areeCategories, themeDisplay)/>
44</#if>
45
46<article>
47 <div class="box-page-name d-flex align-items-center">
48 <div class="container">
49 <div class="row">
50 <div class="col-12 col-md-10 col-lg-8">
51 <h1 class="box-page-name__title">${title}</h1>
52 </div>
53 </div>
54 </div>
55 </div>
56
57 <#-- Info -->
58 <div class="box-info">
59 <div class="container">
60 <div class="row">
61 <div class="col-12">
62 <div class="d-flex flex-column flex-md-row justify-content-md-between align-items-md-end">
63 <div>
64 <#if displaydate?? && displaydate != "">
65 <div class="box-info__date">${displaydate}</div>
66 </#if>
67 <div class="d-flex align-items-center">
68 <#if areeCategories?size gt 0>
69 <#list areeCategories as area>
70 <div class="box-info__category">${area.getTitle(locale)}</div>
71 </#list>
72 </#if>
73 <#if materieCategories?size gt 0>
74 <div class="box-info__materia">
75 <span>${(materieCategories?size == 1)?then(languageUtil.get(locale, "confindustria.materia"), languageUtil.get(locale, "confindustria.materie"))}:</span>
76 <#list materieCategories as mat>
77 ${mat.getTitle(locale)}
78 </#list>
79 </div>
80 </#if>
81 </div>
82 </div>
83 </div>
84 </div>
85 </div>
86 </div>
87 </div>
88
89 <#-- Articolo -->
90 <div class="container">
91 <div class="row">
92 <div class="col-12 col-lg-8 ${(contentVisible == false)?then('col-reserved','')}">
93 <div class="article">
94 <#if contentVisible == false>
95 <#-- Non sono loggato: popup login contenuto riservato-->
96 <#if isLoggedIn == false>
97 <#include "${templatesPath}/CONFINDUSTRIA-PRIVATE-CONTENT-LOGIN" />
98 <#elseif contentVisible == false>
99 <#include "${templatesPath}/CONFINDUSTRIA-PRIVATE-CONTENT-CATEGORY-MESSAGE" />
100 </#if>
101 </#if>
102 <#-- Immagine -->
103 <#if coverImage?? && coverImage != "">
104 <img src="/o/adaptive-media/adapt-image/${entryId}/${fileName}?w=${cardImageWidth}&h=${cardImageHeight}&q=100&fm=webp" alt="${cardImageJson.alt}" class="article__img w-100" />
105 </#if>
106 <#-- Abstract -->
107 <#if contentVisible == true && abstract?? && abstract != "">
108 <div class="article__intro">${abstract}</div>
109 </#if>
110 <#-- Bodytext (sono loggato) -->
111 <#if contentVisible == true >
112 <#if text?? && text != "">
113 <div class="article__text">${text}</div>
114 </#if>
115 </#if>
116 </div>
117 </div>
118
119 <#-- Allegati (sono loggato) -->
120 <#if contentVisible == true >
121 <div class="col-12 col-lg-4">
122 <#if groupDocuments.getSiblings()[0].document.getData() != "">
123 <div class="article__info">
124 <div class="article__label"><@liferay.language key="confindustria.attachments" /></div>
125 <#list groupDocuments.getSiblings() as allegato>
126 <#if allegato.document.getData() != "">
127 <#assign
128 allegatoMap = allegato.document['data']?eval
129 allegatoTitle = allegatoMap['title']
130 />
131 <div class="mb-3">
132 <a href="${allegato.document.getData()}" title="${allegatoTitle}" class="article__attachments d-flex align-items-start">
133 <svg class="ico-svg add">
134 <use xlink:href="${themeIconsPath}#arrow-down-to-line-light"></use>
135 </svg>
136 <span>${allegatoTitle}</span>
137 </a>
138 </div>
139 </#if>
140 </#list>
141 </div>
142 </#if>
143 <#if groupLink.getSiblings()[0].link.getData() != "">
144 <div class="article__info">
145 <div class="article__label"><@liferay.language key="confindustria.links" /></div>
146 <#list groupLink.getSiblings() as cur_link_esterni>
147 <#if cur_link_esterni.titleLink.getData() !="" && cur_link_esterni.link.getData() !="">
148 <div class="mb-3">
149 <a href="${cur_link_esterni.link.getData()}" title="Scarica ${cur_link_esterni.titleLink.getData()}" target="cur_link_esterni.link.getData()" class="article__attachments d-flex align-items-start">
150 <svg class="ico-svg add">
151 <use xlink:href="${themeIconsPath}#arrow-down-to-line-light"/>
152 </svg>
153 <span>${cur_link_esterni.titleLink.getData()}</span>
154 </a>
155 </div>
156 </#if>
157 </#list>
158 </div>
159 </#if>
160 </div>
161 </#if>
162
163 </div>
164
165 <#if contentVisible == true && images.getSiblings()?has_content && images.getSiblings()?size gt 0 && images.getSiblings()[0].getData()?? && images.getSiblings()[0].getData()?has_content>
166 <section class="section photogallery">
167 <div class="row">
168 <div class="col-12">
169 <div class="section__wrap-title d-flex justify-content-between align-items-end">
170 <div class="section__title"><@liferay.language key="confindustria.photogallery"/></div>
171 <div class="slider-controls slider-controls-gallery d-flex align-items-center">
172 <div class="dots"/>
173 </div>
174 </div>
175 </div>
176 </div>
177 <div class="row">
178 <div class="col-12 col-lg-8">
179 <div class="slider slider-gallery">
180 <#list images.getSiblings() as image>
181 <div>
182 <div class="box-photo-lightbox text-center">
183 <a data-senna-off="true" href="${image.getData()}" title="${image.getAttribute("alt")}" id="slider-sede-${image?index}" class="box-photo-lightbox__link fresco" style="background-image: url('${image.getData()}')" data-fresco-group="photogallery_sede" data-fresco-caption="${image.getAttribute("alt")}">
184 <#if image.getAttribute("alt") ?? && image.getAttribute("alt") !="">
185 <span class="box-photo-lightbox__title">${image.getAttribute("alt")}</span>
186 </#if>
187 <span class="d-none">
188 <@liferay.language key="image"/> "${image?index}" </span>
189 </a>
190 </div>
191 </div>
192 </#list>
193 </div>
194 </div>
195 </div>
196 </section>
197 </#if>
198
199 </div>
200</article>
201
202<#-- Contatti -->
203<#assign hasContacts = contact.getSiblings()?has_content && contact.getSiblings()?size gt 0 && contact.getSiblings()[0].getData() != ''/>
204<#if contentVisible == true && hasContacts >
205 <section id="riferimenti" class="section section--dark" data-group="true">
206 <div class="container">
207 <div class="row">
208 <div class="col-12">
209 <div class="section__wrap-title d-flex justify-content-between align-items-end">
210 <div class="section__title"><@liferay.language key="confindustria.contatti.title" /></div>
211 <div class="slider-controls slider-controls-contatti d-flex align-items-center"><div class="dots"></div></div>
212 </div>
213 </div>
214 </div>
215 <div class="row">
216 <div class="col-12">
217 <div class="slider slider-contatti">
218 <#list contact.getSiblings() as cur_contact>
219 <#assign
220 webContentData = jsonFactoryUtil.createJSONObject(cur_contact.getData())
221 />
222 <#if webContentData?? && webContentData.subtype?? && webContentData.subtype == 'CONTATTO'>
223
224 <#assign
225 classPK = webContentData.classPK
226 item = confindustria_template_tool.getDDMJournalArticleValuesMap(classPK?number, locale)
227 nome = item.nome.value
228 cognome = item.cognome.value
229 ruolo = item.ruolo.value
230 telefono = item.telefono.value
231 mobile = item.mobile.value
232 email = item.email.value
233 cardImageOri = item.picture.value
234 cardImageJson = jsonFactoryUtil.createJSONObject(cardImageOri)
235 fileEntryImage = ''
236 entryId = ''
237 fileName = ''
238 />
239 <#if cardImageJson.groupId?? && cardImageJson.groupId!="">
240 <#assign
241 cardImageGroupId = cardImageJson.groupId
242 cardImageUuid = cardImageJson.uuid
243 fileEntryImage = confindustria_template_tool.getFileEntry(cardImageUuid,cardImageGroupId?number,themeDisplay)
244 entryId = fileEntryImage.getFileEntryId()
245 fileName = fileEntryImage.getFileName()
246 />
247 </#if>
248 <div>
249 <#include "${templatesPath}/CONFINDUSTRIA-CONTATTO-CARD" />
250 </div>
251
252 </#if>
253 </#list>
254 </div>
255 </div>
256 </div>
257 </div>
258 </section>
259</#if>