null ACCORDO CLIVET E COMMISSIONE AFFARI RURALI DI PECHINO

Si è verificato un errore nell'elaborarazione del modello.
The following has evaluated to null or missing:
==> urlPartsList[2]  [in template "10110#2640274#1498088" at line 250, column 62]

----
Tip: It's the final [] step 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: urlGroupId = urlPartsList[2]?number  [in template "10110#2640274#1498088" at line 250, column 49]
----
1<#if location?? && location.getData()??> 
2    <#assign  
3        locationField = location.getData() 
4    /> 
5<#else> 
6    <#assign  
7        locationField = "" 
8    /> 
9</#if> 
10<#if enableEventDate?? && enableEventDate.getData()??> 
11    <#assign  
12        enabledEventDate = getterUtil.getBoolean(enableEventDate.getData()) 
13    /> 
14<#else> 
15    <#assign  
16        enabledEventDate = false 
17    /> 
18</#if> 
19<#if eventDate?? && eventDate.getData()??> 
20    <#assign  
21        eventDate_Data = getterUtil.getString(eventDate.getData()) 
22    /> 
23<#else> 
24    <#assign  
25        eventDate_Data = "" 
26    /> 
27</#if> 
28<#if eventEndDate?? && eventEndDate.getData()??> 
29    <#assign  
30        eventEndDate_Data = getterUtil.getString(eventEndDate.getData()) 
31    /> 
32<#else> 
33    <#assign  
34        eventEndDate_Data = "" 
35    /> 
36</#if> 
37<#assign  
38	latitude = 0 
39	longitude = 0 
40	showGallery = false 
41	showAttachments = false 
42	showLinks = false 
43	videoUrl_ = "" 
44	fileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService") 
45/> 
46<#if validator.isNotNull(eventDate_Data)> 
47	<#assign eventDate_DateObj = dateUtil.parseDate("yyyy-MM-dd", eventDate_Data, locale)> 
48</#if> 
49<#if validator.isNotNull(eventEndDate_Data)> 
50	<#assign eventEndDate_DateObj = dateUtil.parseDate("yyyy-MM-dd", eventEndDate_Data, locale)> 
51</#if> 
52<#if videoUrl??> 
53	<#assign videoUrl_ = (videoUrl.getData())!""> 
54</#if> 
55<#if gallery??> 
56	<#assign  
57		images = gallery.getSiblings()   
58		showGallery = images?has_content 
59	/> 
60	<#if images?size==1>  
61		<#if gallery.getData()?? > 
62			<#if gallery.getData() != ""> 
63				<#assign showGallery = true> 
64			<#else> 
65				<#assign showGallery = false> 
66			</#if> 
67		</#if> 
68	</#if> 
69</#if> 
70<#if allegati??> 
71	<#assign  
72		attachments = allegati.getSiblings()   
73		showAttachments = attachments?has_content 
74	/> 
75	<#if attachments?size==1>  
76		<#if allegati.getData()?? > 
77			<#if allegati.getData() != ""> 
78				<#assign showAttachments = true> 
79			<#else> 
80				<#assign showAttachments = false> 
81			</#if> 
82		</#if> 
83	</#if> 
84</#if> 
85 
86<#if links??> 
87	<#assign  
88		extLinks = links.getSiblings()   
89		showLinks = extLinks?has_content 
90	/> 
91	<#if extLinks?size==1>  
92		<#if links.getData()?? > 
93			<#if links.getData() != ""> 
94				<#assign showLinks = true> 
95			<#else> 
96				<#assign showLinks = false> 
97			</#if> 
98		</#if> 
99	</#if> 
100</#if> 
101 
102 
103<style> 
104	.symbol.first { 
105		color: #019DDA; 
106	    font-size: 2rem; 
107
108	.symbol.others  img { 
109	    background-color: #939598; 
110	    font-size: 2rem; 
111	    color: #fff; 
112	    border-radius: 15px; 
113
114	a.symbol:before { 
115	    content: attr(title); 
116	    margin-right: 0.3em; 
117	    font-size: 130%; 
118
119	a.symbol { 
120	    background: #9f9f9f; 
121	    padding: 7px 5px 3px 5px; 
122	    color: white; 
123	    text-decoration: none; 
124
125	a.symbol.first { 
126		color: #019DDA; 
127
128	a.symbol.others { 
129		color: #939598; 
130
131	.clivet-news-header-row { 
132	    padding-bottom: 10px; 
133
134	.clivet-abstract-single-news { 
135		color: #939598; 
136	    padding-bottom: 10px; 
137	    padding-top: 10px; 
138
139	.clivet-abstract-single-news-video { 
140		color: #019DDA; 
141	    padding-bottom: 10px; 
142	    padding-top: 10px; 
143	    text-transform: uppercase; 
144	    margin: 0; 
145
146	.clivet-asset-title { 
147		margin-top: 0; 
148		color: #019DDA; 
149		font-weight: 500; 
150
151	.clivet-asset-body { 
152	    line-height: 1.6em; 
153	    margin-top: 1em; 
154
155	.responsive-scale { 
156	    width: 100%; 
157	    padding-bottom: 56.221198156682027649769585253456%;  
158	    background-size:cover; 
159	    background-position:center; /* IE fix */ 
160
161	.no-side-paddings { 
162		padding-left: 0; 
163		padding-right: 0; 
164
165	.clivet-icon-color, .clivet-icon-color a { 
166		color: #019DDA; 
167
168	.clivet-icon-size { 
169		width: 18px; 
170	}  
171	.clivet-label { 
172		color:black; 
173	}  
174	.clivet-social-icons a { 
175	    text-decoration: none; 
176
177	img.media-object.clivet-media-object { 
178	    width: 1em; 
179	    max-width: 1em; 
180
181	#portlet_com_liferay_journal_content_web_portlet_JournalContentPortlet_INSTANCE_rkP8EgE1QL8p { 
182	    display: none; 
183	     
184
185	h3.clivet-title { 
186		color: #019DDA; 
187		font-weight: 500; 
188
189</style> 
190 
191<#if showGallery> 
192	<script type="text/javascript"> 
193		$(document).ready(function() { 
194		    new smartPhoto(".js-smartPhoto"); 
195		}); 
196	</script> 
197</#if> 
198 
199<div class="container-fluid" style="margin-top:16px;"> 
200	<div class="row"> 
201		<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> 
202		 
203			<div class="row clivet-news-header-row"> 
204				<div class="col-md-5"> 
205					<#if image?? && image.getData()??> 
206						<img class="img-responsive" src="${image.getData()}"> 
207					</#if> 
208				</div> 
209				<div class="col-md-7"> 
210					<div class="row"> 
211						<div class="col-md-12"> 
212							<h3 class="clivet-asset-title">${titolo.getData()}</h3> 
213						</div> 
214						<#if enabledEventDate && validator.isNotNull(eventDate_Data)> 
215							<div class="col-md-12 clivet-abstract-single-news text-capitalize"> 
216								<img src="/o/clivet-liferay-home-theme/images/clivet/IconaCalendario32x32.png" class="clivet-icon-size"> ${dateUtil.getDate(eventDate_DateObj, "dd MMMM yyyy", locale)} 
217								<#if enabledEventDate && validator.isNotNull(eventEndDate_Data)> 
218								&nbsp;-&nbsp;${dateUtil.getDate(eventEndDate_DateObj, "dd MMMM yyyy", locale)} 
219								</#if> 
220							</div> 
221						</#if> 
222						<#if locationField?length?switch(0, false, true) > 
223							<div class="col-md-12 clivet-abstract-single-news text-capitalize"> 
224								<img src="/o/clivet-liferay-home-theme/images/clivet/IconaLocalita32x32.png" class="clivet-icon-size"> ${locationField}  
225							</div> 
226						</#if> 
227						<div class="col-md-12 clivet-social-icons"> 
228							<@createSocialIcons  
229								title=titolo.getData()  
230							/> 
231						</div> 
232					</div> 
233				</div> 
234			</div> 
235			<div class="row"> 
236				<div class="col-md-12 clivet-asset-body"> 
237					${descrizione.getData()} 
238				</div> 
239			</div> 
240            <#if showAttachments> 
241				<div class="row"> 
242					<div class="col-md-12"> 
243						<h3 class="clivet-title mt-4 mb-4"><@liferay.language key="attachments" /></h3> 
244						 
245						<ul class="media-list"> 
246	                	<#list attachments as attachment> 
247	                		<#assign 
248	                			attachmentURL = attachment.getData() 
249	                			urlPartsList = attachmentURL?split("[/,?]", "r") 
250	                			urlGroupId = urlPartsList[2]?number 
251	                			urlUuid = urlPartsList[5]?trim 
252	                			file = fileEntryLocalService.getFileEntryByUuidAndGroupId(urlUuid,urlGroupId) 
253	                		/> 
254	    					<li class="media mb-2"> 
255	    						<div class="media-left mr-2"> 
256	                        		<a href="${attachmentURL}" target="_blank"> 
257	    		                    	<img class="media-object clivet-media-object" 
258	    		                    	    src="https://www-test.clivet.com/documents/10125/2845654/${file.getExtension()}.png" /> 
259	                        		</a> 
260	    						</div> 
261	    						<div class="media-body"> 
262	    							<#assign fileTitle = file.getTitle() /> 
263	    							<#if attachment.allegatiDescrizione?has_content> 
264	    								<#assign fileTitle = attachment.allegatiDescrizione.getData() /> 
265	    							</#if> 
266	    							<#assign fileSize = file.getSize()/1024> 
267									<#assign fileUnit = "KB" /> 
268									<#if fileSize gte 1024> 
269										<#assign fileSize = fileSize/1024> 
270										<#assign fileUnit = "MB" /> 
271									</#if> 
272	                        		<a href="${attachmentURL}" class="media-heading" target="_blank">${fileTitle}</a>&nbsp;${fileSize?floor} ${fileUnit} 
273	    						</div> 
274	    					</li> 
275	                	</#list> 
276	                	</ul> 
277					</div> 
278				</div> 
279            </#if> 
280            <#if showLinks> 
281				<div class="row"> 
282					<div class="col-md-12"> 
283						<h3 class="clivet-title mt-4 mb-4"><@liferay.language key="links" /></h3> 
284						 
285						<ul class="media-list"> 
286	                	<#list extLinks as extLink> 
287	                		<#assign linkURL = extLink.getData() /> 
288	    					<li class="media"> 
289	    						<div class="media-left mr-2"> 
290	                        		<span class="glyphicon glyphicon-paperclip" aria-hidden="true"></span> 
291	    						</div> 
292	    						<div class="media-body"> 
293	    							<#assign linkTitle = extLink.getData() /> 
294	    							<#if extLink.linksDescrizione?has_content> 
295	    								<#assign linkTitle = extLink.linksDescrizione.getData() /> 
296	    							</#if> 
297	                        		<a class="media-heading" href="${linkURL}">${linkTitle}</a> 
298	    						</div> 
299	    					</li> 
300	                	</#list> 
301	                	</ul> 
302					</div> 
303				</div> 
304            </#if> 
305			<#if showGallery> 
306				<div class="row"> 
307					<div class="col-md-12"> 
308						<p class="clivet-abstract-single-news-video"> 
309							<span class="glyphicon glyphicon-camera clivet-icon-color"  
310								aria-hidden="true"></span> <@liferay.language key="gallery" /> 
311						</p> 
312						<div class="row"> 
313							<div class="col-md-12"> 
314			    				<#list images as galleryImage> 
315								<a href="${galleryImage.getData()}" class="js-smartPhoto" target="_blank"/> 
316									<img src="${galleryImage.getData()}&imageThumbnail=1" /> 
317								</a> 
318								</#list> 
319							</div> 
320						</div> 
321					</div> 
322				</div> 
323			</#if> 
324			<#if videoUrl_!=""> 
325				<div class="row"> 
326					<div class="col-md-12"> 
327						<h3 class="clivet-title mt-4 mb-4"><@liferay.language key="video" /></h3> 
328						<div class="embed-responsive embed-responsive-16by9"> 
329							<iframe class="embed-responsive-item" src="${videoUrl_}" allowfullscreen></iframe> 
330						</div> 
331					</div> 
332				</div> 
333			</#if> 
334		</div> 
335	</div> 
336</div> 
337 
338<#macro createSocialIcons title> 
339	<img src='/o/clivet-liferay-home-theme/images/clivet/IconaSocial32x32.png' class='clivet-icon-size'>&nbsp; 
340	<a href="javascript:void(window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(location), 'Share to Facebook','width=600,height=460,menubar=no,location=no,status=no'));" alt="${title}"> 
341		<span class='symbol others'> 
342			<img src="/o/clivet-liferay-home-theme/images/social/facebook.png" width="26" alt="Facebook"/> 
343		</span> 
344	</a>&nbsp; 
345	<a href="javascript:void(window.open('https://twitter.com/intent/tweet?tw_p=tweetbutton&url='+encodeURIComponent(location), 'Share to Twitter','width=600,height=460,menubar=no,location=no,status=no'));" alt="${title}"> 
346		<span class='symbol others'> 
347			<img src="/o/clivet-liferay-home-theme/images/social/twitter.png" width="26" alt="Twitter"/> 
348		</span> 
349	</a>&nbsp; 
350	<a href="javascript:void(window.open('https://www.linkedin.com//share?url='+encodeURIComponent(location)+'&hl=${locale.getLanguage()}', 'Share to Linkedin','width=600,height=460,menubar=no,location=no,status=no'));" alt="${title}"> 
351		<span class='symbol others'> 
352			<img src="/o/clivet-liferay-home-theme/images/social/linkedin.png" width="26" alt="Linkedin"/> 
353		</span> 
354	</a> 
355</#macro> 
356 
357<#macro getLocalizedField  
358    rootElement  
359    fieldName 
360    defaultLocale=.locale 
361    maxLength="0" 
362
363    <#assign maxLng = maxLength?number /> 
364    <#assign result = "" /> 
365    <#list rootElement.elements() as dynamicElement> 
366        <#if stringUtil.equals(fieldName, dynamicElement.attributeValue("name")) > 
367            <#list dynamicElement.elements() as dynamicContent> 
368                <#if dynamicContent.attributeValue("language-id") == locale > 
369                    <#assign result = dynamicContent.getText() /> 
370                </#if> 
371            </#list> 
372        </#if> 
373    </#list> 
374    <#if result?length == 0 > 
375        <@getLocalizedFieldByLocale rootElement=rootElement fieldName=fieldName requiredLocale=defaultLocale maxLength=maxLength /> 
376        <#return /> 
377    </#if> 
378    <#if (maxLng gt 0) && (result?length gt maxLng) > 
379        <#assign maxLng = maxLng - 3 />  
380        <#assign result = result[0..maxLng] + "..." /> 
381    </#if> 
382    ${result} 
383</#macro> 
384 
385 
386<#macro getLocalizedFieldByLocale 
387    rootElement  
388    fieldName 
389    requiredLocale 
390    maxLength="0" 
391
392    <#assign maxLng = maxLength?number /> 
393    <#assign result = "" /> 
394    <#list rootElement.elements() as dynamicElement> 
395        <#if stringUtil.equals(fieldName, dynamicElement.attributeValue("name")) > 
396            <#list dynamicElement.elements() as dynamicContent> 
397                <#if dynamicContent.attributeValue("language-id") == requiredLocale > 
398                    <#assign result = dynamicContent.getText() /> 
399                </#if> 
400            </#list> 
401        </#if> 
402    </#list> 
403    <#if (maxLng gt 0) && (result?length gt maxLng) > 
404        <#assign maxLng = maxLng - 3 />  
405        <#assign result = result[0..maxLng] + "..." /> 
406    </#if> 
407    ${result} 
408</#macro>