Wystąpił błąd podczas przetwarzania szablonu.
The following has evaluated to null or missing:
==> FieldsGroup.MainImage.getAttribute("fileEntryId")  [in template "20100#20127#2479159" at line 5, column 13]

----
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: mainImageId = FieldsGroup.MainImage.g...  [in template "20100#20127#2479159" at line 5, column 1]
----
1<#setting locale = locale> 
2<#setting url_escaping_charset="UTF-8"> 
3<#assign 
4assetCategoriesUtil = serviceLocator.findService("com.neutrica.smotai.clubs.commons.util.JournalArticleAssetCategoryUtil") 
5mainImageId=FieldsGroup.MainImage.getAttribute("fileEntryId") 
6cdnURL = "https://superligacdn.stellis.one" 
7 
8 
9articleCategories = assetCategoriesUtil.getJournalArticleAssetCategories(groupId, .vars['reserved-article-id'].data) 
10encodedTitle = .vars['reserved-article-title'].data?url 
11currentUrl = (themeDisplay.getPortalURL() + themeDisplay.getURLCurrent())?split("?")[0] 
12/> 
13 
14<script data-senna-track="permanent" src="/o/common-utils/lightgallery/lightgallery.min.js" type="text/javascript"></script> 
15<link href="/o/common-utils/lightgallery/css/lightgallery-bundle.min.css" rel="stylesheet" type="text/css"/> 
16<script data-senna-track="permanent" src="/o/common-utils/lightgallery/plugins/lg-autoplay.min.js" type="text/javascript"></script> 
17<script data-senna-track="permanent" src="/o/common-utils/lightgallery/plugins/lg-fullscreen.min.js" type="text/javascript"></script> 
18<script data-senna-track="permanent" src="/o/common-utils/lightgallery/plugins/lg-hash.min.js" type="text/javascript"></script> 
19<script data-senna-track="permanent" src="/o/common-utils/lightgallery/plugins/lg-relative-caption.min.js" type="text/javascript"></script> 
20<script data-senna-track="permanent" src="/o/common-utils/lightgallery/plugins/lg-share.min.js" type="text/javascript"></script> 
21<script data-senna-track="permanent" src="/o/common-utils/lightgallery/plugins/lg-thumbnail.min.js" type="text/javascript"></script> 
22<script data-senna-track="permanent" src="/o/common-utils/lightgallery/plugins/lg-zoom.min.js" type="text/javascript"></script> 
23 
24<div class="gallery-container container ${mainImageId}"> 
25	<h2 class="section-title page-title"> 
26		${.vars['reserved-article-title'].data} 
27	</h2> 
28	<div class="gallery-details"> 
29		<#if (articleCategories?size > 0)> 
30			<#list articleCategories as category> 
31				<span class="tag">${category.getName()}</span> 
32			</#list> 
33		</#if> 
34		<span class="separator-vertical"></span> 
35		<div class="share js-share" id="sharebutton"> 
36			<i class="icon icon-slg-share"></i> 
37			<div class="share-inner"> 
38				<a href="http://www.facebook.com/sharer.php?u=${currentUrl}" class="icon" target="_blank"><i class="icon-slg-facebook"></i></a> 
39				<a href="http://www.linkedin.com/shareArticle?title=${encodedTitle}&amp;mini=true&amp;url=${currentUrl}&amp;summary=" class="icon" target="_blank"><i class="icon-slg-linkedin"></i></a> 
40				<a href="https://twitter.com/intent/tweet?text=${encodedTitle}&amp;tw_p=tweetbutton&amp;url=${currentUrl}" class="icon" target="_blank"><i class="icon-slg-twitter"></i></a> 
41			</div> 
42		</div> 
43	</div> 
44	<div id="lightgallery"> 
45	</div> 
46</div> 
47 
48<script type="text/javascript"> 
49	lightGallery(document.getElementById('lightgallery'), { 
50		plugins: [lgZoom, lgAutoplay, lgFullscreen, lgHash, lgShare, lgThumbnail], 
51		speed: 500, 
52		download: false, 
53		container: document.getElementById('wrapper'), 
54		mobileSettings: { 
55			controls: false, 
56
57	}); 
58 
59	var gallerySize = 9; 
60	var galleryIndex = 0; 
61	var galleryElement = document.getElementById('lightgallery'); 
62	var galleryUpdated = false; 
63	updateGallery(); 
64	setTimeout(() => { 
65		lg = lightGallery(galleryElement, { 
66			plugins: [lgZoom, lgAutoplay, lgFullscreen, lgHash, lgShare, lgThumbnail], 
67			speed: 500, 
68			download: false, 
69			container: document.getElementById('wrapper'), 
70			mobileSettings: { 
71				controls: false, 
72
73		}); 
74	}, 500) 
75	galleryElement.addEventListener("lgBeforeSlide", (event) => { 
76		if (!galleryUpdated && event.detail.index + 1 >= lg.items.length) { 
77			updateGallery(); 
78			galleryUpdated = true; 
79			setTimeout(() => { 
80				lg.refresh(); 
81				galleryUpdated = false; 
82			}, 500); 
83
84	}); 
85 
86	window.addEventListener("scroll", function () { 
87		if (!galleryUpdated && window.scrollY >= galleryElement.scrollHeight - window.innerHeight - 10) { 
88			updateGallery(); 
89			galleryUpdated = true; 
90			setTimeout(() => { 
91				lg.refresh(); 
92				galleryUpdated = false; 
93			}, 500); 
94
95	}); 
96 
97	function updateGallery() { 
98		fetch("${themeDisplay.portalURL}/o/gallery/images?" + new URLSearchParams({ 
99			fileEntryId: ${mainImageId}, 
100			index: galleryIndex, 
101			size: gallerySize 
102		})) 
103				.then((response) => response.json()) 
104				.then((json) => appendImages(json)); 
105
106 
107	function appendImages(imagesData) { 
108		imagesData.forEach(item => { 
109			var galleryA = document.createElement("a"); 
110			var galleryImg = document.createElement("img"); 
111			var galleryUrl = item["url"]; 
112			galleryA.setAttribute("href", "${cdnURL}/imgsize-xxl" + galleryUrl); 
113			galleryImg.setAttribute("src", "${cdnURL}/imgsize-m" + galleryUrl); 
114			galleryImg.classList.add("single-photo","photo-background"); 
115			galleryImg.setAttribute("alt","${.vars['reserved-article-title'].data}"); 
116			galleryImg.setAttribute("loading","lazy") 
117			galleryA.append(galleryImg); 
118			galleryElement.append(galleryA); 
119		}); 
120		galleryIndex += gallerySize; 
121
122	AUI().use("aui-base", 
123			function(A){ 
124				A.one('#sharebutton').on( 
125						'click', 
126						function(event) { 
127							this.toggleClass('active'); 
128
129				); 
130
131	); 
132</script>