Si è verificato un errore nell'elaborarazione del modello.
The following has evaluated to null or missing:
==> item.getJSONObject("data").getJSONObject(defLng)  [in template "114284#114319#366705" at line 129, column 41]

----
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: #assign localizedContent = item.getJS...  [in template "114284#114319#366705" in macro "viewFull" at line 129, column 13]
	- Reached through: @viewFull  [in template "114284#114319#366705" at line 50, column 13]
----
1<#assign 
2    httpUtil = staticUtil["com.liferay.portal.kernel.util.HttpUtil"] 
3     
4    collection = "" 
5    itemId = "" 
6    item = "" 
7/> 
8 
9<#assign 
10    suggestoGUIAPI = serviceLocator.findService("eu.suggesto.suggestogui.service.SuggestoGuiLocalService") 
11    parentLibOld = suggestoGUIAPI.getADTPathToInclude(companyId, groupId, "eu.suggesto.d40.web.portlet.model.D40Configurable", templatesPath, "d40-parent-lib_v1") 
12/> 
13 
14<#include "${parentLibOld}"> 
15 
16<#assign 
17    serviceContext = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"].getServiceContext() 
18    organizationProject = d40UserLocalService.getCurrentOrganizationInfo(serviceContext) 
19/> 
20 
21<#if organizationProject.getJSONObject("data")?has_content && organizationProject.getJSONObject("data").getJSONObject("project")?has_content> 
22    <#assign organizationProjectId = organizationProject.getJSONObject("data").getJSONObject("project").getJSONObject("_id").getString("$oid")> 
23</#if> 
24 
25<#if result.getJsonConfigStringParam("collection", "")?has_content> 
26    <#assign collection = result.getJsonConfigStringParam("collection", "")> 
27</#if> 
28 
29<#if result.getJsonConfigStringParam("view", "")?has_content> 
30    <#assign view = result.getJsonConfigStringParam("view", "")> 
31</#if> 
32 
33<#assign mongoContent = initOrGetMongoCatalogDataBlock(groupId, serviceContext, result, themeDisplay.plid, collection)> 
34 
35<#if mongoContent?has_content> 
36    <#assign 
37        curLang = themeDisplay.getLocale() 
38        defLng = "it_IT" 
39    /> 
40     
41    <div class="position-relative"> 
42        <div class="editing-overlay d-none"></div> 
43        <#assign catalog = d40MongoItemAPI.queryMongoItems(groupId, collection, "{projectId:'${result.projectId}'}", "", 0, 100)> 
44         
45        <#if view == "all"> 
46            <@viewAll /> 
47        </#if> 
48         
49        <#if view == "detail"> 
50            <@viewFull /> 
51        </#if> 
52    </div> 
53</#if> 
54 
55<#macro viewAll> 
56    <section id="offers"> 
57        <div class="container my-5"> 
58            <div class="row card-deck"> 
59                <#if catalog.getJSONObject("data").getJSONArray("items")??> 
60                    <#assign items = catalog.getJSONObject("data").getJSONArray("items")> 
61                     
62                    <#list 0..items.length()-1 as i> 
63                        <#assign doc = items.getJSONObject(i)> 
64                         
65                        <#if doc.mongoitem.getJSONObject(curLang)??> 
66                            <#assign localizedContent = doc.mongoitem.getJSONObject(curLang)> 
67                        <#else> 
68                            <#assign localizedContent = doc.mongoitem.getJSONObject(defLng)> 
69                        </#if> 
70                         
71                        <div class="col-12 col-lg-6 mb-5"> 
72                            <script> 
73                                var params = { 
74                                    'editMode': 'true', 
75                                    'articleId': '${doc._id.$oid}' 
76                                }; 
77                                var shared_params${doc._id.$oid} = JSON.stringify(params); 
78                            </script> 
79                         
80                            <div class="card card-body border-0 h-100 p-0"> 
81                                <a href="servizio?content=${doc._id.$oid}" class="card-header p-0"> 
82                                    <img src="${getTopHintPrefix(500, 300, localizedContent.immagine)}" class="card-img-top"> 
83                                </a> 
84                                <div class="card-body bg-light position-relative section-top-light no-underline"> 
85                                    <a href="servizio?content=${doc._id.$oid}" class="h5 text-darker font-weight-bold">${localizedContent.nome}</a> 
86                                </div> 
87                                <#if themeDisplay.isSignedIn()> 
88                                    <div class="card-body bg-light pt-0"> 
89                                        <button onclick="Liferay.Portlet.refresh('#p_p_id${result.portletNamespace}', {'${result.portletNamespace}jsonParams': shared_params${doc._id.$oid}});" class="btn bg-colored text-white text-uppercase"><i class="fa fa-pen mr-3"></i> Modifica</button> 
90                                    </div> 
91                                </#if> 
92                            </div> 
93                        </div> 
94                    </#list> 
95                <#else> 
96                    <p class="text-center">Empty</p> 
97                </#if> 
98                <#if themeDisplay.isSignedIn()> 
99                    <script> 
100                        var add_params = { 
101                            'editMode': 'true', 
102                            'addNew': 'true' 
103                        }; 
104                        var new_params = JSON.stringify(add_params); 
105                    </script> 
106                     
107                    <div class="col-12 d-flex justify-content-center mt-5"> 
108                        <a href="javascript:void(0);" onclick="Liferay.Portlet.refresh('#p_p_id${result.portletNamespace}', {'${result.portletNamespace}jsonParams': new_params});" class="btn bg-colored btn-lg text-white text-uppercase"><i class="fa fa-plus mr-3"></i> Aggiungi</a> 
109                    </div> 
110                </#if> 
111            </div> 
112        </div> 
113    </section> 
114</#macro> 
115 
116<#macro viewFull> 
117    <#if httpUtil.getParameter(themeDisplay.getURLCurrent(), "content")?has_content> 
118        <#assign itemId = httpUtil.getParameter(themeDisplay.getURLCurrent(), "content")> 
119    </#if> 
120     
121    <#if itemId?has_content && d40MongoItemAPI.getMongoItem(groupId, collection, itemId)??> 
122        <#assign item = d40MongoItemAPI.getMongoItem(groupId, collection, itemId)> 
123    </#if> 
124     
125    <#if item?has_content> 
126        <#if item.getJSONObject("data").getJSONObject(curLang)??> 
127            <#assign localizedContent = item.getJSONObject("data").getJSONObject(curLang)> 
128        <#else> 
129            <#assign localizedContent = item.getJSONObject("data").getJSONObject(defLng)> 
130        </#if> 
131         
132        <section id="slideshow"> 
133            <div class="swiper-container"> 
134                <div class="swiper-wrapper"> 
135                    <#assign slides = localizedContent.getJSONArray("slides")> 
136                    <#list 0..slides.length()-1 as i> 
137                        <#if slides.getString(i)?has_content> 
138                            <#assign slide = slides.getJSONObject(i)> 
139                     
140                            <div class="swiper-slide"> 
141                                <div class="dark-overlay"></div> 
142                                <img src="${getPrefix(1920, 1080, slide.url)}" class="fit-cover w-100 h-100"> 
143                                <div class="carousel-caption text-white"> 
144                                    <div class="text-center"> 
145                                        <h1 class="display-3 font-weight-bold outline spaced">${slide.titolo}</h1> 
146                                        <#if slide.sottotitolo?has_content> 
147                                            <h3 class="font-weight-bold outline">${slide.sottotitolo}</h3> 
148                                        </#if> 
149                                    </div> 
150                                </div> 
151                            </div> 
152                        </#if> 
153                    </#list> 
154                </div> 
155            </div> 
156        </section> 
157         
158        <section id="redazionale"> 
159            <div class="text-center pb-3"> 
160                <h1 class="font-weight-bold text-darker mt-5">${localizedContent.nome}</h1> 
161            </div> 
162             
163            <#assign sezioni = localizedContent.getJSONArray("sezioni")> 
164            <#list 0..sezioni.length()-1 as i> 
165                <#if sezioni.getString(i)?has_content> 
166                    <#assign sezione = sezioni.getJSONObject(i)> 
167                     
168                    <div class="container mb-5 pt-5"> 
169                        <div class="text-center pb-3"> 
170                            <h3 class="font-weight-bold text-darker mb-4">${sezione.titolo}</h3> 
171                            <h4 class="text-dark mb-5">${sezione.sottotitolo}</h4> 
172                        </div> 
173                        <div class="row mb-5"> 
174                            <#if (i%2 == 0)> 
175                                <#assign alignClass = "order-1"> 
176                            <#else> 
177                                <#assign alignClass = "order-1 order-lg-2"> 
178                            </#if> 
179                            <div class="col-12 col-lg-6 ${alignClass}"> 
180                                <img src="${getPrefix(500, 600, sezione.immagine)}" class="w-100"> 
181                            </div> 
182                             
183                            <#if (i%2 == 0)> 
184                                <#assign alignClass = "order-1"> 
185                            <#else> 
186                                <#assign alignClass = "order-2 order-lg-1"> 
187                            </#if> 
188                            <div class="col-12 col-lg-6 ${alignClass}"> 
189                                <h5 class="text-dark my-4">${sezione.descrizione}</h5> 
190                            </div> 
191                        </div> 
192                    </div> 
193                </#if> 
194            </#list> 
195        </section> 
196         
197        <script> 
198            var params = { 
199                'editMode': 'true', 
200                'articleId': '${itemId}' 
201            }; 
202            var shared_params = JSON.stringify(params); 
203        </script> 
204         
205        <#if themeDisplay.isSignedIn()> 
206            <div class="editing-controls view-mode position-absolute d-flex flex-row bg-dark"> 
207                <a href="javascript:void(0);" onclick="Liferay.Portlet.refresh('#p_p_id${result.portletNamespace}', {'${result.portletNamespace}jsonParams': shared_params});" class="edit-button lfr-portal-tooltip d-flex align-items-center justify-content-center" data-title="Modifica"> 
208                    <i class="fa fa-pen text-white"></i> 
209                </a> 
210            </div> 
211        </#if> 
212    </#if> 
213</#macro> 

Outdoor mozzafiato

vivi

la montagna più spettacolare
con la famiglia per momenti
indimenticabili

vedi le nostre attività