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#356216" at line 143, 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#356216" in macro "viewFull" at line 143, column 13]
	- Reached through: @viewFull  [in template "114284#114319#356216" at line 56, column 13]
----
1<style> 
2    #outdoor .card-body.section-top-light:before{ 
3        top: -31px; 
4
5</style> 
6 
7<#assign 
8    httpUtil = staticUtil["com.liferay.portal.kernel.util.HttpUtil"] 
9     
10    collection = "" 
11    itemId = "" 
12    item = "" 
13/> 
14 
15<#assign 
16    suggestoGUIAPI = serviceLocator.findService("eu.suggesto.suggestogui.service.SuggestoGuiLocalService") 
17    parentLibOld = suggestoGUIAPI.getADTPathToInclude(companyId, groupId, "eu.suggesto.d40.web.portlet.model.D40Configurable", templatesPath, "d40-parent-lib_v1") 
18/> 
19 
20<#include "${parentLibOld}"> 
21 
22<#assign 
23    serviceContext = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"].getServiceContext() 
24    organizationProject = d40UserLocalService.getCurrentOrganizationInfo(serviceContext) 
25/> 
26 
27<#if organizationProject.getJSONObject("data")?has_content && organizationProject.getJSONObject("data").getJSONObject("project")?has_content> 
28    <#assign organizationProjectId = organizationProject.getJSONObject("data").getJSONObject("project").getJSONObject("_id").getString("$oid")> 
29</#if> 
30 
31<#if result.getJsonConfigStringParam("collection", "")?has_content> 
32    <#assign collection = result.getJsonConfigStringParam("collection", "")> 
33</#if> 
34 
35<#if result.getJsonConfigStringParam("view", "")?has_content> 
36    <#assign view = result.getJsonConfigStringParam("view", "")> 
37</#if> 
38 
39<#assign mongoContent = initOrGetMongoCatalogDataBlock(groupId, serviceContext, result, themeDisplay.plid, collection)> 
40 
41<#if mongoContent?has_content> 
42    <#assign 
43        curLang = themeDisplay.getLocale() 
44        defLng = "it_IT" 
45    /> 
46     
47    <div class="position-relative"> 
48        <div class="editing-overlay d-none"></div> 
49        <#assign catalog = d40MongoItemAPI.queryMongoItems(groupId, collection, "{projectId:'${result.projectId}'}", "{'mongoitem.it_IT.ordine': 1}", 0, 100)> 
50         
51        <#if view == "all"> 
52            <@viewPreview /> 
53        </#if> 
54         
55        <#if view == "detail"> 
56            <@viewFull /> 
57        </#if> 
58    </div> 
59</#if> 
60 
61<#macro viewPreview> 
62    <section id="outdoor" class="pt-5"> 
63        <div class="container"> 
64            <#if catalog.getJSONObject("data").getJSONArray("items")??> 
65                <#assign items = catalog.getJSONObject("data").getJSONArray("items")> 
66                 
67                <div class="row"> <#-- card-deck --> 
68                    <#list (0..items.length()-1) as i> 
69                        <#assign doc = items.getJSONObject(i)> 
70                         
71                        <#if doc.mongoitem.getJSONObject(curLang)??> 
72                            <#assign localizedContent = doc.mongoitem.getJSONObject(curLang)> 
73                        <#else> 
74                            <#assign localizedContent = doc.mongoitem.getJSONObject(defLng)> 
75                        </#if> 
76                         
77                        <script> 
78                            var params = { 
79                                'editMode': 'true', 
80                                'articleId': '${doc._id.$oid}' 
81                            }; 
82                            var shared_params${doc._id.$oid} = JSON.stringify(params); 
83                        </script> 
84                             
85                        <#if i == 0> 
86                            <#assign col_class = "col-12 col-lg-9 mx-auto"> 
87                        <#else> 
88                            <#assign col_class = "col-12 col-md-6 col-lg-4"> 
89                        </#if> 
90                         
91                        <div class="${col_class} mb-4"> 
92                            <h3 class="text-center mb-0">${localizedContent.giorno}</h3> 
93                            <div class="card card-body border-0 h-100 m-0"> 
94                                <a href="attività-singola?content=${doc._id.$oid}" class="card-header p-0"> 
95                                    <img src="${getPrefix(1000, 400, localizedContent.immagine)}" class="card-img-top"> 
96                                </a> 
97                                <div class="card-body bg-light section-top-light position-relative rounded-bottom pt-0"> 
98                                    <div class="btn bg-colored floating rounded-circle cursor-default position-absolute text-white"> 
99                                        <img src="${localizedContent.difficolta}" draggable="false" height="32" width="32" class="my-2"> 
100                                    </div> 
101                                    <h5 class="text-darker font-weight-bold my-2">${localizedContent.nome}</h5> 
102                                    <#if themeDisplay.isSignedIn()> 
103                                        <a href="javascript:void(0);" 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</a> 
104                                    </#if> 
105                                </div> 
106                            </div> 
107                        </div> 
108                    </#list> 
109                </div> 
110            <#else> 
111                <p class="text-center">Empty</p> 
112            </#if> 
113            <#if themeDisplay.isSignedIn()> 
114                <script> 
115                    var add_params = { 
116                        'editMode': 'true', 
117                        'addNew': 'true' 
118                    }; 
119                    var new_params = JSON.stringify(add_params); 
120                </script> 
121                 
122                <div class="col-12 d-flex justify-content-center mt-5"> 
123                    <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> 
124                </div> 
125            </#if> 
126        </div> 
127    </section> 
128</#macro> 
129 
130<#macro viewFull> 
131    <#if httpUtil.getParameter(themeDisplay.getURLCurrent(), "content")?has_content> 
132        <#assign itemId = httpUtil.getParameter(themeDisplay.getURLCurrent(), "content")> 
133    </#if> 
134     
135    <#if itemId?has_content && d40MongoItemAPI.getMongoItem(groupId, collection, itemId)??> 
136        <#assign item = d40MongoItemAPI.getMongoItem(groupId, collection, itemId)> 
137    </#if> 
138     
139    <#if item?has_content> 
140        <#if item.getJSONObject("data").getJSONObject(curLang)??> 
141            <#assign localizedContent = item.getJSONObject("data").getJSONObject(curLang)> 
142        <#else> 
143            <#assign localizedContent = item.getJSONObject("data").getJSONObject(defLng)> 
144        </#if> 
145         
146        <section id="slideshow"> 
147            <div class="swiper-container"> 
148                <div class="swiper-wrapper"> 
149                    <#assign slides = localizedContent.getJSONArray("slides")> 
150                    <#list 0..slides.length()-1 as i> 
151                        <#if slides.getString(i)?has_content> 
152                            <#assign slide = slides.getJSONObject(i)> 
153                     
154                            <div class="swiper-slide"> 
155                                <div class="dark-overlay"></div> 
156                                <img src="${getTopHintPrefix(1920, 1080, slide.url)}" class="fit-cover w-100 h-100"> 
157                                <div class="carousel-caption text-white"> 
158                                    <div class="text-center"> 
159                                        <h1 class="display-3 font-weight-bold outline">${slide.titolo}</h1> 
160                                        <h3 class="font-weight-bold outline">${slide.sottotitolo}</h3> 
161                                    </div> 
162                                </div> 
163                            </div> 
164                        </#if> 
165                    </#list> 
166                </div> 
167            </div> 
168        </section> 
169         
170        <section id="room-details"> 
171            <div class="container-fluid-big my-5"> 
172                <div class="row"> 
173                    <div class="col-12 col-lg-3"> 
174                        <div class="d-flex align-items-center justify-content-center w-100 h-100"> 
175                            <img src="${images_folder}/svg/mountain.svg" draggable="false" class="img-fluid"> 
176                        </div>                             
177                    </div> 
178                    <div class="col-12 col-lg-6"> 
179                        <div class="text-center"> 
180                            <h1 class="text-darker font-weight-bold mb-1">${localizedContent.nome}</h1> 
181                            <p class="text-dark">${localizedContent.descrizione}</p> 
182                        </div> 
183                    </div> 
184                    <div class="col-12 col-lg-3"> 
185                        <div class="d-flex align-items-center justify-content-center w-100 h-100"> 
186                            <img src="${images_folder}/svg/mountain.svg" draggable="false" class="img-fluid"> 
187                        </div>  
188                    </div> 
189                </div>                     
190            </div> 
191             
192            <#if localizedContent.altro?has_content> 
193                <div class="container"> 
194                    <div class="text-center"> 
195                        <h4 class="text-dark mb-3 mb-lg-5">${localizedContent.altro}</h4> 
196                    </div> 
197                </div> 
198            </#if> 
199             
200            <#if localizedContent.getJSONArray("gallery")??> 
201                <div class="container section-top-white"> 
202                    <div class="swiper-container"> 
203                        <div class="swiper-wrapper"> 
204                            <#assign gallery = localizedContent.getJSONArray("gallery")> 
205                            <#list 0..gallery.length()-1 as i> 
206                                <#if gallery.getString(i)?has_content> 
207                                    <#assign slide = gallery.getJSONObject(i)> 
208                                    <div class="swiper-slide"> 
209                                        <img src="${getPrefix(1280, 720, slide.url)}" class="fit-cover w-100 h-100"> 
210                                    </div> 
211                                </#if> 
212                            </#list> 
213                        </div> 
214                        <#if (gallery.length()-1 > 1)> 
215                            <div class="gallery-controls text-center position-lg-absolute mt-4 mt-lg-0"> 
216                                <button type="button" class="btn bg-dark rounded prev-pic"> 
217                                    <i class="fa fa-chevron-left text-white p-2"></i> 
218                                </button> 
219                                <button type="button" class="btn bg-dark rounded next-pic"> 
220                                    <i class="fa fa-chevron-right text-white p-2"></i> 
221                                </button> 
222                            </div> 
223                        </#if> 
224                    </div> 
225                 
226                    <!-- div class="text-center mt-3 mt-lg-5"> 
227                        <a href="${localizedContent.linkPulsantePrenota}" class="btn bg-colored rounded text-white font-weight-bold p-3 px-3">${localizedContent.testoPulsantePrenota}</a> 
228                    </div --> 
229                </div> 
230            </#if> 
231        </section> 
232             
233        <section id="outdoor" class="pt-5"> 
234            <div class="container"> 
235                <div class="text-center mb-3"> 
236                    <h1 class="text-colored font-weight-bold mb-5">Vedi le altre attività</h1> 
237                </div> 
238                 
239                <#if catalog.getJSONObject("data").getJSONArray("items")??> 
240                    <#assign items = catalog.getJSONObject("data").getJSONArray("items")> 
241                     
242                    <div class="row"> 
243                        <#list 0..items.length()-1 as i> 
244                            <#assign doc = items.getJSONObject(i)> 
245                             
246                            <#if doc.mongoitem.getJSONObject(curLang)??> 
247                                <#assign localizedContent = doc.mongoitem.getJSONObject(curLang)> 
248                            <#else> 
249                                <#assign localizedContent = doc.mongoitem.getJSONObject(defLng)> 
250                            </#if> 
251                         
252                            <#if doc._id.$oid != itemId> 
253                                <div class="col-12 col-md-6 col-lg-4 mb-4 mb-lg-0"> 
254                                    <a href="attività-singola?content=${doc._id.$oid}" class="card card-body border-0 h-100 p-0 mb-0"> 
255                                        <div class="card-header bg-white"> 
256                                            <h2 class="text-darker font-weight-bold text-center">${localizedContent.giorno}</h2> 
257                                        </div> 
258                                        <img src="${getPrefix(1000, 400, localizedContent.immagine)}" class="card-img-top"> 
259                                        <div class="card-body bg-light section-top-light position-relative rounded-bottom"> 
260                                            <div class="btn bg-colored floating rounded-circle position-absolute text-white"> 
261                                                <img src="${localizedContent.difficolta}" height="32" width="32" class="my-2"> 
262                                            </div> 
263                                            <h5 class="text-darker font-weight-bold my-2">${localizedContent.nome}</h5> 
264                                        </div> 
265                                    </a> 
266                                </div> 
267                            </#if> 
268                        </#list> 
269                    </div> 
270                <#else> 
271                    <p class="text-center">Empty</p> 
272                </#if> 
273            </div> 
274        </section> 
275         
276        <#if themeDisplay.isSignedIn()> 
277            <script> 
278                var params = { 
279                    'editMode': 'true', 
280                    'articleId': '${itemId}' 
281                }; 
282                var shared_params = JSON.stringify(params); 
283            </script> 
284         
285            <div class="editing-controls view-mode position-absolute d-flex flex-row bg-dark"> 
286                <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"> 
287                    <i class="fa fa-pen text-white"></i> 
288                </a> 
289            </div> 
290        </#if> 
291    </#if> 
292</#macro> 

Paesaggio e montagne unici

Moena

vi aspetta per una vacanza indimenticabile, all'insegna della natura e di paesaggi da favola.

Vivila anche tu