Aggregatore Risorse

Si è verificato un errore nell'elaborarazione del modello.
The following has evaluated to null or missing:
==> .vars['reserved-article-id']  [in template "20116#20152#232500132" at line 15, column 30]

----
Tip: It's the final [] step that caused this error, not those before it.
----
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 reservedArticleId = .vars["re...  [in template "20116#20152#232500132" at line 15, column 1]
----
1<div class="ist-press-release"> 
2<#assign timeComunication = ""> 
3<#assign locationComunication = ""> 
4 
5<#assign 
6serviceContextThreadLocal = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"] 
7themeDisplay = serviceContextThreadLocal.getServiceContext().getThemeDisplay() 
8/> 
9 
10<#assign priceSensitiveCategoryName = themeDisplay.getThemeSetting("price-sensitive-category-name") > 
11 
12<#assign JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")> 
13<#assign AssetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")> 
14 
15<#assign reservedArticleId = .vars['reserved-article-id'].data > 
16<#assign article = JournalArticleLocalService.getArticle(groupId, reservedArticleId) > 
17<#assign categoryNames = AssetCategoryLocalService.getCategoryNames("com.liferay.journal.model.JournalArticle", article.getResourcePrimKey()) > 
18 
19<#assign isPrimeSensitive = false > 
20<#if categoryNames?seq_contains(priceSensitiveCategoryName)> 
21    <#assign isPrimeSensitive = true > 
22</#if> 
23 
24<#if time.getData()?has_content> 
25    <#assign timeComunication = " - " + time.getData()> 
26</#if> 
27 
28<#if location.getData()?has_content> 
29    <#assign locationComunication = ", " + location.getData()> 
30</#if> 
31 
32<#if getterUtil.getBoolean(showTitle.getData())> 
33    <div class="title"> 
34	    <h1>${title.getData()}</h1> 
35	</div> 
36</#if> 
37 
38<#assign no_link_css_class = "" > 
39<#if !documentLabel?has_content || !documentLabel.getData()?has_content || !documentLinkString?has_content> 
40	<#assign no_link_css_class = "no-link" > 
41</#if> 
42 
43 
44    <div class="price-container-share-icon-wrapper"> 
45        <#if isPrimeSensitive> 
46    		<div class="price-container"> 
47    			<div class="price-point"></div> 
48    			<div class="price-sensitive">Price sensitive</div> 
49    		</div> 
50    	</#if> 
51		<div class="sharing-wrapper-mobile"> 
52            <div class="social-sharing"> 
53                <div class="social-share-icons"> 
54                    <a class="share btn social-btn" target="_blank"> 
55                        <span class="text"> 
56                            <#if shareLabel?has_content && shareLabel.getData()?has_content> 
57                                ${shareLabel.getData()} 
58                            <#else> 
59                                Condividi 
60                            </#if> 
61                        </span> 
62                    </a> 
63                    <div class="buttons-container"> 
64                        <a class="email btn social-btn" href="mailto:?&amp;body="><span class="text">Mail</span> </a> 
65                        <a class="facebook btn social-btn" href="https://www.facebook.com/sharer/sharer.php?u=" target="new"> <span class="text">Facebook</span> </a> 
66                        <a class="twitter btn social-btn" href="https://twitter.com/home?status=" target="new"> <span class="text">Twitter</span> </a> 
67                        <a class="messenger btn social-btn" href="fb-messenger://share?link=" target="new"> <span class="text">Messenger</span> </a> 
68                        <a class="more btn social-btn" target="_blank"> <span class="text">Espandi</span> </a> 
69        			</div> 
70                </div> 
71 
72                <div class="social-share-popup"> 
73        			<div class="social-share-wrapper"><a aria-label="Chiudi" class="close"> <img class="image-link" src="/o/bper-theme/images/icn_close.png" /> </a> 
74 
75        				<#if shareLabel?has_content && shareLabel.getData()?has_content> 
76        					<h3 class="title">${shareLabel.getData()}</h3> 
77        				</#if> 
78 
79        					<a class="email btn social-btn" href="mailto:?&amp;subject="> <span class="text">Mail</span> </a> 
80        					<a class="facebook btn social-btn" href="https://www.facebook.com/sharer/sharer.php?u=" target="new"> <span class="text">Facebook</span> </a> 
81        					<a class="twitter btn social-btn" href="https://twitter.com/home?status=" target="new"> <span class="text">Twitter</span> </a> 
82        					<a class="messenger btn social-btn" href="fb-messenger://share?link=" target="new"> <span class="text">Messenger</span> </a> 
83        					<a class="linkedin btn social-btn" href="https://www.linkedin.com/shareArticle?mini=true&amp;url=&amp;title=&amp;summary=summary&amp;source=" target="new"> <span class="text">LinkedIn</span> </a> 
84        					<a class="googleplus btn social-btn" href="https://plus.google.com/share?url=" target="new"> <span class="text">Google plus</span> </a> <a class="print btn social-btn" onclick="window.print()"> <span class="text">Print</span> </a> 
85                    </div> 
86                </div> 
87            </div> 
88 
89	</div> 
90<div class="press-release-content ${no_link_css_class}"> 
91 
92	<div class="info"> 
93 
94	    <div class="date-and-location-icon-wrapper"> 
95 
96    		<div class="date-and-location"> 
97 
98    			<#assign date_Data = getterUtil.getString(date.getData())> 
99 
100    			<#if validator.isNotNull(date_Data)> 
101    				<#assign date_DateObj = dateUtil.parseDate("yyyy-MM-dd", date_Data, locale)> 
102 
103    				<span class="date">${dateUtil.getDate(date_DateObj, "dd MMMM yyyy", locale)}</span> 
104    				${timeComunication}${locationComunication} 
105    			</#if> 
106 
107    		</div> 
108 
109            <div class="sharing-wrapper"> 
110                <div class="social-sharing"> 
111                    <div class="social-share-icons"> 
112                        <a class="share btn social-btn" target="_blank"> 
113                            <span class="text"> 
114                                <#if shareLabel?has_content && shareLabel.getData()?has_content> 
115                                    ${shareLabel.getData()} 
116                                <#else> 
117                                    Condividi 
118                                </#if> 
119                            </span> 
120                        </a> 
121                        <div class="buttons-container"> 
122                            <a class="email btn social-btn" href="mailto:?&amp;body="><span class="text">Mail</span> </a> 
123                            <a class="facebook btn social-btn" href="https://www.facebook.com/sharer/sharer.php?u=" target="new"> <span class="text">Facebook</span> </a> 
124                            <a class="twitter btn social-btn" href="https://twitter.com/home?status=" target="new"> <span class="text">Twitter</span> </a> 
125                            <a class="messenger btn social-btn" href="fb-messenger://share?link=" target="new"> <span class="text">Messenger</span> </a> 
126                            <a class="more btn social-btn" target="_blank"> <span class="text">Espandi</span> </a> 
127            			</div> 
128                    </div> 
129 
130                    <div class="social-share-popup"> 
131            			<div class="social-share-wrapper"><a aria-label="Chiudi" class="close"> <img class="image-link" src="/o/bper-theme/images/icn_close.png" /> </a> 
132 
133            				<#if shareLabel?has_content && shareLabel.getData()?has_content> 
134            					<h3 class="title">${shareLabel.getData()}</h3> 
135            				</#if> 
136 
137            					<a class="email btn social-btn" href="mailto:?&amp;subject="> <span class="text">Mail</span> </a> 
138            					<a class="facebook btn social-btn" href="https://www.facebook.com/sharer/sharer.php?u=" target="new"> <span class="text">Facebook</span> </a> 
139            					<a class="twitter btn social-btn" href="https://twitter.com/home?status=" target="new"> <span class="text">Twitter</span> </a> 
140            					<a class="messenger btn social-btn" href="fb-messenger://share?link=" target="new"> <span class="text">Messenger</span> </a> 
141            					<a class="linkedin btn social-btn" href="https://www.linkedin.com/shareArticle?mini=true&amp;url=&amp;title=&amp;summary=summary&amp;source=" target="new"> <span class="text">LinkedIn</span> </a> 
142            					<a class="googleplus btn social-btn" href="https://plus.google.com/share?url=" target="new"> <span class="text">Google plus</span> </a> <a class="print btn social-btn" onclick="window.print()"> <span class="text">Print</span> </a> 
143                        </div> 
144                    </div> 
145                </div> 
146            </div> 
147        </div> 
148	</div> 
149    <#if text?has_content && text.getData()?has_content> 
150		<div class="press-text"> 
151			${text.getData()} 
152		</div> 
153	</#if> 
154 
155<#assign documentLinkString = ""> 
156<#assign documentTarget = "_blank"> 
157 
158<#if documentLabel.documentLink.getData()?has_content> 
159	<#assign documentLinkString = documentLabel.documentLink.getData()> 
160<#elseif documentLabel.documentExternalLink.getData()?trim?has_content> 
161	<#assign documentLinkString = documentLabel.documentExternalLink.getData()?trim> 
162<#elseif documentLabel.documentInternalLink.getData()?has_content> 
163	<#assign documentLinkString = documentLabel.documentInternalLink.getData()> 
164	<#assign documentTarget = "_self"> 
165</#if> 
166 
167<#if documentLabel?has_content && documentLabel.getData()?has_content && documentLinkString?has_content> 
168 
169		<a class="tealium-event link-cta link-cta-icon press-release-link" href="${documentLinkString}" target="${documentTarget}"> 
170			${documentLabel.getData()} 
171		</a> 
172 
173</#if> 
174</div> 
175 
176<script> 
177function socialSharing(socialClass) { 
178    $(socialClass).each(function() { 
179        var social = $(this); 
180        var shareIcons = social.find(".social-share-icons"); 
181        var sharePopup = social.find(".social-share-popup"); 
182        createURLSocial(social); 
183        socialAnimation(shareIcons, sharePopup); 
184        moreButton(shareIcons, sharePopup); 
185		socialSetPosition(social); 
186		$(window).resize(function(){ 
187			socialSetPosition(social); 
188		}); 
189    }); 
190
191 
192function socialSetPosition(social){ 
193	var w1 = social.find(".social-share-icons .buttons-container").width(); 
194	var pos=w1 + 30; 
195	social.find(".social-share-icons").css("transform","translateX("+pos+"px)"); 
196
197//Social sharing - Animation activator on sharing buttons 
198function socialAnimation(shareIcons, sharePopup) { 
199    var shareButton = shareIcons.find(".share"); 
200	var arrowButton = shareIcons.find(".arrow"); 
201	arrowButton.on("click",function() { 
202		shareButton.trigger("click"); 
203    }); 
204    shareButton.on("click",function() { 
205		var shareIcons=$(this).parents(".social-share-icons"); 
206		if (window.innerWidth > 600) { 
207			if (shareIcons.hasClass("active")) { 
208				shareIcons.removeClass("active"); 
209
210			else { 
211				shareIcons.addClass("active"); 
212
213
214        else { 
215			if (shareIcons.hasClass("active")) { 
216				shareIcons.removeClass("active"); 
217
218			socialPopupManager(sharePopup); 
219
220    }); 
221
222//Social sharing - More button behaviour manager 
223function moreButton(shareIcons, sharePopup) { 
224    var moreButton = shareIcons.find(".more"); 
225    moreButton.click(function() { 
226		shareIcons.removeClass("active"); 
227        socialPopupManager(sharePopup); 
228    }); 
229
230//Social sharing - popup manager 
231function socialPopupManager(sharePopup) { 
232	sharePopup.addClass("show"); 
233	//Close button 
234	var close = $(sharePopup).find(".close"); 
235	close.click(function() { 
236		sharePopup.removeClass("show"); 
237	}); 
238	//Esc button 
239	$(window).keyup(function(event) { 
240		if (event.which == 27) { 
241			sharePopup.removeClass("show"); 
242
243	}); 
244
245 
246//Social sharing - Url generator 
247function createURLSocial(social, freehtml, title) { 
248    var currentUrl = encodeURIComponent(window.location.href); 
249	var title = escape(document.title); 
250 
251    //fb 
252    var url = social.find(".facebook").attr("href") + currentUrl; 
253    social.find(".facebook").attr("href", url); 
254 
255	//twitter 
256    url = social.find(".twitter").attr("href") + currentUrl + " " + title; 
257    social.find(".twitter").attr("href", url); 
258 
259	//googleplus 
260    var url = social.find(".googleplus").attr("href") + currentUrl; 
261    social.find(".googleplus").attr("href", url); 
262 
263	//linkedin 
264    url = social.find(".linkedin").attr("href"); 
265    url = url.replace("url=", "url=" + currentUrl); 
266    url = url.replace("source=", "source=" + currentUrl); 
267    url = url.replace("title=", "title=" + title); 
268    url = url.replace("summary=", "summary=" + getMetaDescription()); 
269    social.find(".linkedin").attr("href", url); 
270 
271	//email 
272    url = social.find(".email").attr("href") + currentUrl + " " + title; 
273    social.find(".email").attr("href", url); 
274 
275	//messenger 
276	var appID="&app_id="+"522840358060244"; 
277    var url = encodeURIComponent(social.find(".messenger").attr("href") + window.location.href + appID); 
278    social.find(".messenger").attr("href", url); 
279
280 
281//Social sharing - url generator 
282function getSiteRoot(){ 
283    var rootPath = window.location.protocol + "//" + window.location.host + "/"; 
284    if (window.location.hostname == "localhost") { 
285        var path = window.location.pathname; 
286        if (path.indexOf("/") == 0) { 
287            path = path.substring(1); 
288
289        path = path.split("/", 1); 
290        if (path != "") { 
291            rootPath = rootPath + path + "/"; 
292
293
294    return rootPath; 
295
296//Social sharing - url generator 
297function getMetaDescription() { 
298	var metas = document.getElementsByTagName('meta'); 
299	$.each(metas, function() { 
300		if ($(this).attr("name") == "description") { 
301			return $(this).attr("content"); 
302
303	}); 
304    return ""; 
305
306 
307</script>