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@58b9cdc6"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign json = jsonFactoryUtil.create...  [in template "10154#10192#21663762" at line 107, column 33]
----
1<#setting locale="it_IT"> 
2 
3<#assign siteBaseURL = "https://www.toscana-notizie.it" /> 
4 
5<#assign DLFileEntryLocalServiceUtil = staticUtil["com.liferay.document.library.kernel.service.DLFileEntryLocalServiceUtil"] /> 
6<#assign AssetCategoryLocalServiceUtil = staticUtil["com.liferay.asset.kernel.service.AssetCategoryLocalServiceUtil"]> 
7 
8<#assign LayoutLocalServiceUtil = staticUtil["com.liferay.portal.kernel.service.LayoutLocalServiceUtil"] /> 
9<#assign AssetCategoryServiceUtil = staticUtil["com.liferay.asset.kernel.service.AssetCategoryServiceUtil"] /> 
10 
11<#assign childCategoryId = 0 /> 
12<#assign parentCategoryId = 0 /> 
13 
14<#assign countViewAll = 0 /> 
15<#assign viewALLArchivio = "false" /> 
16 
17<#assign imagePlaceHolderPath = themeDisplay.getTheme().getContextPath() + themeDisplay.getTheme().getImagesPath() + "/toscana-notizie-placeholder.png" /> 
18<#assign imagePath = themeDisplay.getPathThemeImages() /> 
19 
20<#if portletPrefences?? && portletPreferences?has_content> 
21<#assign values = portletPreferences['queryValues0'] /> 
22<#if values?has_content> 
23    <#list values as value> 
24        <#assign currentCat = AssetCategoryServiceUtil.getCategory(value?number) /> 
25        <#assign AssetVocabularyServiceUtil = staticUtil["com.liferay.asset.kernel.service.AssetVocabularyServiceUtil"]> 
26        <#assign assetVocabulary = AssetVocabularyServiceUtil.getVocabulary(currentCat.getVocabularyId()) /> 
27        <#if assetVocabulary.getName() == "Temi"> 
28            <#assign countViewAll = countViewAll + 1 /> 
29            <#if currentCat.getParentCategory()??> 
30                <#assign childCategoryId = currentCat.getCategoryId()/> 
31                <#assign parentCategoryId = currentCat.getParentCategory().getCategoryId() /> 
32            <#else> 
33                <#assign parentCategoryId = currentCat.getCategoryId()/> 
34            </#if> 
35        </#if> 
36    </#list> 
37</#if> 
38</#if> 
39 
40 
41<section class="rtds-section rtds-section--notizie rtds-py-8 md:rtds-py-12 rtds-background-09"> 
42    <div class="rtds-container rtds-space-y-4"> 
43        <div class="rtds-section-header rtds-section-header--notizie"> 
44            <div class="rtds-grid md:rtds-flex rtds-items-center rtds-gap-4 md:rtds-gap-6 rtds-content-inverse"> 
45                <div class="rtds-flex rtds-items-center rtds-gap-2 md:rtds-gap-4 rtds-order-2 md:rtds-order-none"> 
46 
47                    <h2 class="rtds-heading-3 md:rtds-heading-2">Notizie</h2> 
48 
49                    <div class="rtds-vertical-divider rtds-w-4 md:rtds-w-6 lg:rtds-w-8"> 
50                        <img class="rtds-w-full rtds-h-auto" src="${imagePath}/vertical-divider.svg" alt=""> 
51                    </div> 
52 
53                    <span class="rtds-text-sm rtds-leading-none"> 
54 
55                        <span>Da </span> 
56                        <a href="http://www.toscana-notizie.it/archivio" class="rtds-action-link rtds-content-inverse hover:rtds-content-inverse focus:rtds-content-inverse rtds-action-link--sm"> 
57                            Toscana Notizie 
58                            <svg class="rtds-icon rtds-fill-current" aria-hidden="true" focusable="false" role="img"> 
59                                <use href="${imagePath}/icons.svg#mini--arrow-small-right" /> 
60                            </svg> 
61 
62                        </a> 
63                    </span> 
64 
65                </div> 
66 
67            </div> 
68        </div> 
69 
70        <div class="rtds-space-y-5"> 
71            <#if !entries?has_content> 
72                <#if themeDisplay.isSignedIn()> 
73                    <div class="alert alert-info"> 
74                        <@liferay.language key="there-are-no-menu-items-to-display" /> 
75                    </div> 
76                </#if> 
77            </#if> 
78 
79 
80            <#if entries?has_content && entries?size gt 0> 
81                <#assign maxSize = (entries?size / 3)?floor * 3> 
82                <#assign entries = entries[0..(maxSize - 1)]> 
83 
84 
85            <div class="rtds-notizie-list rtds-grid rtds-gap-4 md:rtds-grid-cols-2 lg:rtds-grid-cols-3"> 
86 
87                <#list entries as curEntry> 
88                    <#assign assetRenderer = curEntry.getAssetRenderer() /> 
89                    <#assign className = assetRenderer.getClassName() /> 
90 
91                    <#assign rendererURL = siteBaseURL + "/-/" + assetRenderer.getUrlTitle() /> 
92 
93                    <#if className = "com.liferay.journal.model.JournalArticle" > 
94                        <#assign article = assetRenderer.getArticle() /> 
95                        <#if article?? > 
96                            <#assign docXml = saxReaderUtil.read(article.getContent()) /> 
97 
98                            <#assign rendererURL = siteBaseURL + "/-/" + assetRenderer.getUrlTitle() /> 
99 
100                            <#assign titleText = htmlUtil.escape(curEntry.getTitle(locale))?truncate(70, '...') /> 
101 
102                            <#assign Immagine = docXml.valueOf("//dynamic-element[@name='Immagine']/dynamic-content/text()") /> 
103 
104                            <#assign fileUrl = imagePlaceHolderPath /> 
105                            <#assign altImg = "" /> 
106                            <#if Immagine?has_content> 
107                                <#assign json = jsonFactoryUtil.createJSONObject(Immagine) /> 
108                                <#assign nameImg = json.getString("name") /> 
109                                <#assign altImg = json.getString("alt") /> 
110                                <#assign fileEntryId = json.getLong("fileEntryId") /> 
111                                <#assign uuiD = json.getString("uuid") /> 
112                                <#assign groupId = json.getLong("groupId") /> 
113 
114                                <#if fileEntryId != 0> 
115                                    <#attempt> 
116                                        <#assign fileEntry = DLFileEntryLocalServiceUtil.getFileEntry(fileEntryId) /> 
117                                        <#assign fileUrl = "/documents/" + fileEntry.getGroupId() + "/" + fileEntry.getFolderId() + "/" + fileEntry.getTitle() + "/" + fileEntry.getUuid() /> 
118                                    <#recover> </#attempt> 
119                                <#else> 
120                                    <#if groupId != 0 && uuiD != ""> 
121                                        <#attempt> 
122 
123                                            <#assign fileEntry = DLFileEntryLocalServiceUtil.getFileEntryByUuidAndGroupId(uuiD,groupId) /> 
124 
125                                            <#if fileEntry?? > 
126                                                <#assign fileUrl = "/documents/" + fileEntry.getGroupId() + "/" + fileEntry.getFolderId() + "/" + fileEntry.getTitle() + "/" + fileEntry.getUuid() /> 
127 
128                                            </#if> 
129                                            <#recover> 
130                                        </#attempt> 
131                                    </#if> 
132                                </#if> 
133                            </#if> 
134                            <div class="rtds-col"> 
135                                <article class="rtds-card rtds-card--news rtds-card--news-small rtds-card--horizontal  rtds-card--horizontal-left  is-card-fullclickable rtds-group/card"> 
136                                    <@rt.picture fileUrl titleText /> 
137                                    <div class="rtds-card__content"> 
138 
139                                        <div class="rtds-card__heading"> 
140                                            <h3 class="rtds-card__title"> 
141                                                <a class="group-hover/card:rtds-underline " href="${rendererURL?html}"> 
142 
143                                                    ${titleText} 
144 
145                                                </a> 
146                                            </h3> 
147                                            <div class="rtds-card__metadata"> 
148 
149                                                <div class="rtds-card__categories"> 
150                                                    <span class="rtds-category "> 
151                                                        <#if parentCategoryId?? && parentCategoryId != 0 && (countViewAll < 2) > 
152                                                            <#assign catSelected = AssetCategoryServiceUtil.getCategory(parentCategoryId?number) /> 
153                                                            <#if catSelected?? > 
154                                                                ${catSelected.getName()} 
155                                                            </#if> 
156                                                        <#else> 
157                                                            <#assign categoryList = curEntry.getCategories() /> 
158 
159                                                            <#list categoryList as category> 
160                                                                <#assign AssetVocabularyServiceUtil = staticUtil["com.liferay.asset.kernel.service.AssetVocabularyServiceUtil"]> 
161                                                                <#assign assetVocabulary = AssetVocabularyServiceUtil.getVocabulary(category.getVocabularyId()) /> 
162                                                                <#if assetVocabulary.getName() == "Temi"> 
163                                                                    ${category.getName()?html} 
164                                                                </#if> 
165                                                            </#list> 
166 
167                                                        </#if> 
168                                                    </span> 
169                                                </div> 
170 
171                                                <div class="rtds-card__date"> 
172                                                    <time datetime="${curEntry.publishDate?string["yyyy-MM-dd"]}">${curEntry.publishDate?string["dd.MM.yyyy"]}</time> 
173                                                </div> 
174 
175                                            </div> 
176                                        </div> 
177                                    </div> 
178                                </article> 
179                            </div> 
180                        </#if> 
181                    </#if> 
182                </#list> 
183            </div> 
184        </div> 
185    </div> 
186 
187    </#if> 
188 
189</section>