Eugenio Giani
Presidente della Giunta Regionale della Toscana

Agenda

Si è verificato un errore nell'elaborarazione del modello.
Java method "com.liferay.portal.json.JSONFactoryImpl.createJSONObject(String)" threw an exception when invoked on com.liferay.portal.json.JSONFactoryImpl object "com.liferay.portal.json.JSONFactoryImpl@1d1ffea7"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign json = jsonFactoryUtil.create...  [in template "10154#10192#21510483" at line 205, column 37]
----
1<#setting locale="it_IT"> 
2<#setting time_zone=timeZone.ID> 
3 
4<#assign siteBaseURL = themeDisplay.getPortalURL() + themeDisplay.getPathFriendlyURLPublic() + themeDisplay.getLayout().getGroup().getFriendlyURL() /> 
5<#assign DLFileEntryLocalServiceUtil = staticUtil["com.liferay.document.library.kernel.service.DLFileEntryLocalServiceUtil"] /> 
6<#assign imagePath = themeDisplay.getTheme().getContextPath() + themeDisplay.getTheme().getImagesPath() /> 
7<#assign AssetVocabularyServiceUtil = staticUtil["com.liferay.asset.kernel.service.AssetVocabularyServiceUtil"]> 
8<#assign AssetCategoryLocalServiceUtil = staticUtil["com.liferay.asset.kernel.service.AssetCategoryLocalServiceUtil"]> 
9<#assign UserLocalServiceUtil = staticUtil["com.liferay.portal.kernel.service.UserLocalServiceUtil"]> 
10<#assign imagePath = themeDisplay.getTheme().getContextPath() + themeDisplay.getTheme().getImagesPath() /> 
11 
12<#assign AssetCategoryServiceUtil = staticUtil["com.liferay.asset.kernel.service.AssetCategoryServiceUtil"] /> 
13<#assign childCategoryId = 0 /> 
14<#assign parentCategoryId = 0 /> 
15<#assign values = portletPreferences['queryValues0'] /> 
16<#if values?has_content> 
17    <#list values as value> 
18        <#assign currentCat = AssetCategoryServiceUtil.getCategory(value?number) /> 
19        <#assign AssetVocabularyServiceUtil = staticUtil["com.liferay.asset.kernel.service.AssetVocabularyServiceUtil"]> 
20        <#assign assetVocabulary = AssetVocabularyServiceUtil.getVocabulary(currentCat.getVocabularyId()) /> 
21        <#if assetVocabulary.getName() == "Temi"> 
22            <#if currentCat.getParentCategory()??> 
23                <#assign childCategoryId = currentCat.getCategoryId()/> 
24                <#assign parentCategoryId = currentCat.getParentCategory().getCategoryId() /> 
25            <#else> 
26                <#assign parentCategoryId = currentCat.getCategoryId()/> 
27            </#if> 
28        </#if> 
29    </#list> 
30</#if> 
31 
32<div class="rt-wrapper"> 
33    <div class="rt-container"> 
34        <section class="rt-section rt-section--grid rt-section--grid-3" aria-label=""> 
35            <#if entries?has_content> 
36                <#assign countEvidenza = 0 /> 
37                <#list entries as curEntry> 
38                    <#assign countEvidenza = countEvidenza + 1 /> 
39                    <#if countEvidenza <= 3> 
40 
41                        <#assign assetRenderer = curEntry.getAssetRenderer() /> 
42                        <#assign className = assetRenderer.getClassName() /> 
43 
44                        <#assign rendererURL = siteBaseURL + "/-/" + assetRenderer.getUrlTitle() /> 
45 
46                        <#if className = "com.liferay.journal.model.JournalArticle" > 
47                            <#assign article = assetRenderer.getArticle() /> 
48                            <#if article?? > 
49                                <#assign docXml = saxReaderUtil.read(article.getContent()) /> 
50 
51                                <#assign titleText = curEntry.getTitle(locale)?truncate(95, '...') /> 
52 
53                                <#assign temi = [] /> 
54                                <#assign autore = "" /> 
55                                <#assign categoryList = curEntry.getCategories() /> 
56 
57                                <#list categoryList as category> 
58                                    <#assign assetVocabulary = AssetVocabularyServiceUtil.getVocabulary(category.getVocabularyId()) /> 
59                                    <#if assetVocabulary.getName() == "Temi"> 
60                                        <#assign temi = temi + [category] /> 
61                                    <#elseif assetVocabulary.getName() == "5. Autori"> 
62                                        <#assign autore = category.getName() /> 
63                                    </#if> 
64                                </#list> 
65 
66                                <#assign nomeAutore = "" /> 
67                                <#if autore?? && autore != "" && autore != "redazione"> 
68                                    <#assign userAutore = UserLocalServiceUtil.getUserByScreenName(themeDisplay.getCompanyId(), autore) /> 
69                                    <#if userAutore??  && userAutore?has_content> 
70                                        <#assign nomeAutore =  userAutore.getFullName() /> 
71                                    </#if> 
72                                <#else> 
73                                    <#assign nomeAutore = "Redazione" /> 
74                                </#if> 
75 
76                                <#assign Immagine = docXml.valueOf("//dynamic-element[@name='Immagine']/dynamic-content/text()") /> 
77                                <#assign Descrizione = docXml.valueOf("//dynamic-element[@name='Descrizione']/dynamic-content/text()") /> 
78                                <#assign Etichetta = docXml.valueOf("//dynamic-element[@name='EtichettaDiLancio']/dynamic-content/text()") /> 
79                                <#assign fileUrl = "" /> 
80                                <#assign altImg = "" /> 
81                                <#if Immagine?has_content> 
82                                    <#assign json = jsonFactoryUtil.createJSONObject(Immagine) /> 
83                                    <#assign nameImg = json.getString("name") /> 
84                                    <#assign altImg = json.getString("alt") /> 
85                                    <#assign fileEntryId = json.getLong("fileEntryId") /> 
86                                    <#assign uuiD = json.getString("uuid") /> 
87                                    <#assign groupId = json.getLong("groupId") /> 
88 
89                                    <#if fileEntryId != 0> 
90                                        <#attempt> 
91                                            <#assign fileEntry = DLFileEntryLocalServiceUtil.getFileEntry(fileEntryId) /> 
92                                            <#assign fileUrl = "/documents/" + fileEntry.getGroupId() + "/" + fileEntry.getFolderId() + "/" + fileEntry.getTitle() + "/" + fileEntry.getUuid() /> 
93                                        <#recover> </#attempt> 
94                                    <#else> 
95                                        <#if groupId != 0 && uuiD != ""> 
96                                            <#attempt> 
97                                                <#assign fileEntry = DLFileEntryLocalServiceUtil.getFileEntryByUuidAndGroupId(uuiD,groupId) /> 
98                                                <#if fileEntry?? > 
99                                                    <#assign fileUrl = "/documents/" + fileEntry.getGroupId() + "/" + fileEntry.getFolderId() + "/" + fileEntry.getTitle() + "/" + fileEntry.getUuid() /> 
100                                                </#if> 
101                                                <#recover> 
102                                            </#attempt> 
103 
104                                        </#if> 
105                                    </#if> 
106                                <#else> 
107                                    <#assign fileUrl = imagePath + "/toscana-notizie-placeholder.png" /> 
108                                </#if> 
109 
110 
111                                <div class="rt-box rt-box--has-image"> 
112                                    <div aria-label="${altImg?html}" class="rt-box__image" 
113                                         style="background-image: url('${fileUrl?html}');"> 
114 
115                                        <#if Etichetta?? && Etichetta != ""> 
116                                            <div class="rt-box__category"> 
117                                                ${Etichetta?html} 
118                                            </div> 
119                                        </#if> 
120                                    </div> 
121 
122                                    <div class="rt-box__text"> 
123                                        <div class="rt-box__meta"> 
124 
125                                            <div class="rt-box__publication"> 
126                                                <div class="rt-box__date">${curEntry.publishDate?string["dd MMMM"]?remove_beginning("0")}</div> 
127                                                <div class="rt-box__time">${curEntry.publishDate?string["HH:mm"]?remove_beginning("0")}</div> 
128                                            </div> 
129                                            <div class="rt-box__author"> 
130                                                di ${nomeAutore?html} 
131                                            </div> 
132                                        </div> 
133 
134                                        <div class="rt-box__title"> 
135                                            <a title="Vai alla pagina ${titleText}" 
136                                               aria-label="Vai alla pagina ${titleText}" href="${rendererURL}"> 
137                                                ${titleText?replace('<[^>]+>','','r')} 
138                                            </a> 
139                                        </div> 
140 
141                                    </div> 
142                                </div> 
143 
144 
145                            </#if> 
146                        </#if> 
147                    </#if> 
148                </#list> 
149            </#if> 
150 
151        </section> 
152    </div> 
153</div> 
154 
155<div class="rt-wrapper"> 
156    <div class="rt-container"> 
157        <section class="rt-section rt-section--grid rt-section--grid-4" aria-label=""> 
158            <#if entries?has_content> 
159                <#assign countEvidenza = 0 /> 
160                <#list entries as curEntry> 
161                    <#assign countEvidenza = countEvidenza + 1 /> 
162                    <#if (countEvidenza > 3)> 
163 
164                        <#assign assetRenderer = curEntry.getAssetRenderer() /> 
165                        <#assign className = assetRenderer.getClassName() /> 
166 
167                        <#assign rendererURL = siteBaseURL + "/-/" + assetRenderer.getUrlTitle() /> 
168 
169                        <#if className = "com.liferay.journal.model.JournalArticle" > 
170                            <#assign article = assetRenderer.getArticle() /> 
171                            <#if article?? > 
172                                <#assign docXml = saxReaderUtil.read(article.getContent()) /> 
173 
174                                <#assign titleText = curEntry.getTitle(locale)?truncate(95, '...') /> 
175 
176                                <#assign temi = [] /> 
177                                <#assign autore = "" /> 
178                                <#assign categoryList = curEntry.getCategories() /> 
179 
180                                <#list categoryList as category> 
181                                    <#assign assetVocabulary = AssetVocabularyServiceUtil.getVocabulary(category.getVocabularyId()) /> 
182                                    <#if assetVocabulary.getName() == "Temi"> 
183                                        <#assign temi = temi + [category] /> 
184                                    <#elseif assetVocabulary.getName() == "5. Autori"> 
185                                        <#assign autore = category.getName() /> 
186                                    </#if> 
187                                </#list> 
188 
189                                <#assign nomeAutore = "" /> 
190                                <#if autore?? && autore != "" && autore != "redazione"> 
191                                    <#assign userAutore = UserLocalServiceUtil.getUserByScreenName(themeDisplay.getCompanyId(), autore) /> 
192                                    <#if userAutore??  && userAutore?has_content> 
193                                        <#assign nomeAutore =  userAutore.getFullName() /> 
194                                    </#if> 
195                                <#else> 
196                                    <#assign nomeAutore = "Redazione" /> 
197                                </#if> 
198 
199                                <#assign Immagine = docXml.valueOf("//dynamic-element[@name='Immagine']/dynamic-content/text()") /> 
200                                <#assign Descrizione = docXml.valueOf("//dynamic-element[@name='Descrizione']/dynamic-content/text()") /> 
201                                <#assign Etichetta = docXml.valueOf("//dynamic-element[@name='EtichettaDiLancio']/dynamic-content/text()") /> 
202                                <#assign fileUrl = "" /> 
203                                <#assign altImg = "" /> 
204                                <#if Immagine?has_content> 
205                                    <#assign json = jsonFactoryUtil.createJSONObject(Immagine) /> 
206                                    <#assign nameImg = json.getString("name") /> 
207                                    <#assign altImg = json.getString("alt") /> 
208                                    <#assign fileEntryId = json.getLong("fileEntryId") /> 
209                                    <#assign uuiD = json.getString("uuid") /> 
210                                    <#assign groupId = json.getLong("groupId") /> 
211 
212                                    <#if fileEntryId != 0> 
213                                        <#attempt> 
214                                            <#assign fileEntry = DLFileEntryLocalServiceUtil.getFileEntry(fileEntryId) /> 
215                                            <#assign fileUrl = "/documents/" + fileEntry.getGroupId() + "/" + fileEntry.getFolderId() + "/" + fileEntry.getTitle() + "/" + fileEntry.getUuid() /> 
216                                        <#recover> </#attempt> 
217                                    <#else> 
218                                        <#if groupId != 0 && uuiD != ""> 
219                                            <#attempt> 
220                                                <#assign fileEntry = DLFileEntryLocalServiceUtil.getFileEntryByUuidAndGroupId(uuiD,groupId) /> 
221                                                <#if fileEntry?? > 
222                                                    <#assign fileUrl = "/documents/" + fileEntry.getGroupId() + "/" + fileEntry.getFolderId() + "/" + fileEntry.getTitle() + "/" + fileEntry.getUuid() /> 
223                                                </#if> 
224                                                <#recover> 
225                                            </#attempt> 
226                                        </#if> 
227                                    </#if> 
228                                <#else> 
229                                    <#assign fileUrl = imagePath + "/toscana-notizie-placeholder.png" /> 
230                                </#if> 
231 
232                                <div class="rt-box rt-box--secondary"> 
233                                    <div class="rt-box__text"> 
234                                        <div class="rt-box__publication"> 
235                                            <div class="rt-box__date"> 
236                                                ${curEntry.publishDate?string["dd MMMM"]?remove_beginning("0")} 
237                                            </div> 
238 
239                                            <div class="rt-box__category"> 
240                                                <#assign currentCategory = 0 /> 
241                                                <#list temi as category> 
242                                                    <#if parentCategoryId != 0> 
243                                                        <#if (currentCategory?? && currentCategory != category.getCategoryId()) && (category.getCategoryId() == parentCategoryId) || (category.getParentCategory()?? && (category.getParentCategory().getCategoryId() == parentCategoryId))> 
244                                                            <#assign currentCategory = category.getCategoryId() /> 
245                                                            ${category.getName()?html} 
246                                                        </#if> 
247                                                    <#else> 
248                                                        <#if (currentCategory?? && currentCategory != category.getCategoryId()) > 
249                                                            <#assign currentCategory = category.getCategoryId() /> 
250                                                            ${category.getName()?html} 
251                                                        </#if> 
252                                                    </#if> 
253                                                </#list> 
254                                            </div> 
255                                        </div> 
256 
257                                        <div class="rt-box__title"> 
258                                            <a title="Vai alla pagina ${titleText}" 
259                                               aria-label="Vai alla pagina ${titleText}" href="${rendererURL}"> 
260                                                ${titleText?replace('<[^>]+>','','r')} 
261                                            </a> 
262                                        </div> 
263 
264                                        <div class="rt-box__author"> 
265                                            di ${nomeAutore?html} 
266                                        </div> 
267 
268                                    </div> 
269                                </div> 
270                            </#if> 
271                        </#if> 
272                    </#if> 
273                </#list> 
274            </#if> 
275        </section> 
276    </div> 
277</div>