Kure’s Coastline - Japan Travel Guide - Japanspecialist

An error occurred while processing the template.
The following has evaluated to null or missing:
==> webContentData.classPK  [in template "20098#20124#446850" at line 178, column 19]

----
Tip: It's the step after the last dot 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: classPK = webContentData.classPK?numb...  [in template "20098#20124#446850" in macro "printCard" at line 178, column 9]
	- Reached through: @printCard cur_FeaturedInTours, cur_F...  [in template "20098#20124#446850" at line 139, column 33]
----
1<#assign TourCardTemplateId = "782852"><#-- template: embed - Tour Card - verbosed --> 
2 
3 
4<#-- read article IDs from site config --> 
5<#assign theme_settings = themeDisplay.getThemeSettings() /> 
6 
7<#assign subBannerArticleId = ""/> 
8<#assign bannerArticleId = ""/> 
9<#if theme_settings["banner-destination-id"]??> 
10	<#assign bannerArticleId = getterUtil.getString(theme_settings["banner-destination-id"]) /> 
11</#if> 
12<#if theme_settings["sub-banner-id"]??> 
13	<#assign subBannerArticleId = getterUtil.getString(theme_settings["sub-banner-id"]) /> 
14</#if> 
15 
16 
17<#-- setting urlHelper --> 
18<#assign curUrl = themeDisplay.getURLCurrent()?string> 
19<#if curUrl?contains(themeDisplay.getSiteGroup().friendlyURL)> 
20    <#assign urlHelper = themeDisplay.getPathFriendlyURLPublic() + themeDisplay.getSiteGroup().friendlyURL> 
21<#else> 
22    <#assign urlHelper = ""> 
23</#if> 
24<#-- end setting --> 
25 
26 
27<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") /> 
28<#--setting locale=locale.toString()--> 
29 
30 
31<@liferay_util["html-top"] outputKey="htmltop"> 
32    <#assign themeCssPath = themeDisplay.getPathThemeCss() /> 
33    <#assign themeJsPath = themeDisplay.getPathThemeJavaScript() /> 
34    <!-- lightgallery style --> 
35    <link rel="stylesheet" href="${themeCssPath}/lightgallery.css" /> 
36 
37    <!-- lightgallery scripts --> 
38    <script src="${themeJsPath}/lightgallery.min.js"></script> 
39    <!-- lightgallery plugins scripts --> 
40    <script src="${themeJsPath}/lg-thumbnail.min.js"></script> 
41    <script src="${themeJsPath}/lg-zoom.min.js"></script> 
42    <script src="${themeJsPath}/lg-hash.min.js"></script> 
43</@> 
44 
45<div class="-Destination -Destination--typeDetail" data-pagetype="destination"> 
46    <div class="-Destination-inner"> 
47        <div class="-Destination-head"> 
48            <header class="-Header -Header--typeH1"> 
49                <h1 class="-Heading -Heading--typeH1 -Header-heading">${ScreenName.getData()}</h1> 
50                <p class="-Subheading -Header-subheading"> 
51                    ${ShortDescription.getData()} 
52                </p> 
53            </header> 
54        </div> 
55        <div class="-Destination-body"> 
56            <div class="-Section -Destination-section -Destination-section--typeGallery"> 
57                <div class="-Section-inner"> 
58            <div class="-Gallery" id="-DestinationGallery"> 
59                <div class="-Gallery-inner"> 
60                    <div class="-Gallery-main"> 
61                        <#assign imgBigUrl = getAdaptiveImageUrl(MainImage, 'big') > 
62                        <#assign imgLargeUrl = getAdaptiveImageUrl(MainImage, 'large') > 
63                        <#assign imgMediumUrl = getAdaptiveImageUrl(MainImage, 'medium') > 
64                        <#assign imgText = MainImage.getAttribute('alt')> 
65                        <a class="-Gallery-item" href="${imgLargeUrl}" 
66                            data-src="${imgMediumUrl}" 
67                            data-sources='[{"srcset": "${imgBigUrl}", "media":"(min-width:1280px)"}, {"srcset": "${imgLargeUrl}", "media":"(min-width:640px)"}]' 
68                            data-sub-html="<p>${imgText}</p>"> 
69                            <img src="${imgLargeUrl}" alt="${imgText}" data-pin-media="${imgBigUrl}" data-pin-description="${imgText}" /> 
70                        </a> 
71                    </div> 
72 
73                    <#-- gallery list start --> 
74                    <#if GalleryImage?? && GalleryImage.getSiblings()?has_content && GalleryImage.getData()?? && GalleryImage.getData() != ""> 
75                        <div class="-Gallery-aside"> 
76                            <#list GalleryImage.getSiblings() as cur_GalleryImage> 
77                                <#if cur_GalleryImage.getData()?? && cur_GalleryImage.getData() != ""> 
78                                    <#--  <#assign imgFullUrl = themeDisplay.getPortalURL() + MainImage.getData()>  --> 
79                                    <#assign imgBigUrl = getAdaptiveImageUrl(cur_GalleryImage, 'big') > 
80                                    <#assign imgLargeUrl = getAdaptiveImageUrl(cur_GalleryImage, 'large') > 
81                                    <#assign imgMediumUrl = getAdaptiveImageUrl(cur_GalleryImage, 'medium') > 
82                                    <#assign imgSmallUrl = getAdaptiveImageUrl(cur_GalleryImage, 'small') > 
83                                    <#assign imgText = cur_GalleryImage.getAttribute('alt')> 
84                                    <a class="-Gallery-item" href="${imgLargeUrl}" 
85                                        data-src="${imgMediumUrl}" 
86                                        data-sources='[{"srcset": "${imgBigUrl}", "media":"(min-width:1280px)"}, {"srcset": "${imgLargeUrl}", "media":"(min-width:640px)"}]' 
87                                        data-sub-html="<p>${imgText}</p>"> 
88                                        <img src="${imgSmallUrl}" alt="${imgText}" data-pin-media="${imgBigUrl}" data-pin-description="${imgText}" /> 
89                                    </a> 
90                                </#if> 
91                            </#list> 
92                        </div> 
93                    </#if> 
94 
95                </div> 
96            </div> 
97        </div> 
98    </div> 
99        <div class="-Section -Destination-section -Destination-section--typeDescription #-gridLayout" data-fragment-md="2of3"> 
100        <div class="-Section-inner"> 
101            <div class="-maxWidth-colspan8 -htmlElements"> 
102                ${Description.getData()} 
103            </div> 
104        </div> 
105    </div> 
106 
107    <div class="-Section -Destination-section -Destination-section--typeCTA"> 
108        <div class="-Section-inner"> 
109            <div class="-stackLayout" data-space="01"> 
110 
111                <#-- inner banner --> 
112                <#if bannerArticleId != ""> 
113                    <@embedWc bannerArticleId ScreenName.getData()/> 
114                <#else> 
115                    <p><strong>SET BANNER ARTICLE ID in site config</strong></p> 
116                </#if> 
117 
118                <#-- inner sub banner --> 
119                <#if subBannerArticleId != ""> 
120                    <@embedWc subBannerArticleId ScreenName.getData()/> 
121                <#else> 
122                    <p><strong>SET SUB-BANNER ARTICLE ID in site config</strong></p> 
123                </#if> 
124 
125            </div> 
126        </div> 
127    </div> 
128 
129    <#-- featured in --> 
130    <div class="-Section -Destination-section -Destination-section--typeFeaturedIn"> 
131        <div class="-Section-inner"> 
132            <h2 class="-Heading -Heading--typeH2 -Heading--skinPrimary">${languageUtil.get(locale, 'vta.featured.in.tours')}:</h2> 
133            <div class="-TourGroup"> 
134 
135                <div class="-TourGroup-inner"> 
136                    <div class="-ContentsLayout -ContentsLayout--typeFluid" data-equalize="group"> 
137                        <#if FeaturedInTours??> 
138                            <#list FeaturedInTours.getSiblings() as cur_FeaturedInTours> 
139                                <@printCard cur_FeaturedInTours cur_FeaturedInTours?index/> 
140                            </#list> 
141                        </#if> 
142                    </div> 
143                </div> 
144 
145            </div> 
146        </div> 
147    </div> 
148</div> 
149 
150 
151<#--  Macros/Functions  --> 
152 
153<#-- embed liferay webcontent (banners) --> 
154<#macro embedWc WcId subjectName> 
155 
156    <#assign 
157        JournalArticleService = serviceLocator.findService("com.liferay.journal.service.JournalArticleService") 
158        serviceContext = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"].getServiceContext() 
159        group_id = themeDisplay.getScopeGroupId()?number 
160        journalArticle = JournalArticleService.getArticle(group_id, WcId) 
161        temp = serviceContext.setAttribute("subject_name", "${subjectName}") 
162        /> 
163        <@liferay_journal["journal-article"] 
164            articleId=journalArticle.getArticleId() 
165            <#-- ddmTemplateKey="xxxxxxx" --> 
166            ddmTemplateKey=journalArticle.getDDMTemplateKey() 
167            groupId=journalArticle.getGroupId() 
168            wrapperCssClass="gtm-DestinationDetail" 
169        /> 
170</#macro> 
171 
172 
173<#-- print a "featured in" card --> 
174<#macro printCard wcData cardInex> 
175    <#--  <#local webContentData = jsonFactoryUtil.createJSONObject(tourData.getData()))/>  --> 
176    <#-- used for back compatibility, for new usage apply commented line above (object type templateNode): --> 
177    <#local webContentData = jsonFactoryUtil.createJSONObject(wcData.get("data")) 
178        classPK = webContentData.classPK?number!"" 
179        journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") 
180        journalArticle = journalArticleLocalService.getLatestArticle(classPK)!"none" 
181    /> 
182 
183    <#if journalArticle.status != 3><#-- article is publicated and non expired --> 
184 
185        <div class="-ContentsLayout-content -ContentsLayout-content--size4"> 
186            <div class="-Tour -Tour--typePreview -Tour--typePreviewMain -TourGroup-tour"> 
187                    <#attempt> 
188                        <@liferay_journal["journal-article"] 
189                            articleId=journalArticle.getArticleId() 
190                            ddmTemplateKey="${TourCardTemplateId}" <#-- template: AssetPub - Tour Card - verbosed --> 
191                            <#--  ddmTemplateKey=journalArticle.getDDMTemplateKey()  --> 
192                            groupId=journalArticle.getGroupId() 
193                        /> 
194                    <#recover><#-- if article is broken/wrong/missing --> 
195                        <p>something wrong with this tour:</p> 
196                        <p>${journalArticle.urlTitle} status: ${journalArticle.status}</p> 
197                    </#attempt> 
198            </div> 
199        </div> 
200 
201    <#else><#-- article IS expired --> 
202        <!-- Card ${cardInex+1}: Tour ${journalArticle.urlTitle} is Expired --> 
203    </#if> 
204 
205</#macro> 
206 
207 
208<#-- big, large, medium, small --> 
209<#function getAdaptiveImageUrl image size > 
210    <#local data = image.getData()> 
211    <#local imgName = data?keep_before_last("/")?keep_after_last("/")> 
212    <#local imgUuid = data?keep_after_last("/")> 
213    <#local imgTimeStamp = data?keep_after("?")> 
214    <#local imgFileEntryId = image.getAttribute("fileEntryId")> 
215    <#--  <#local imgUrl = themeDisplay.getPortalURL() + "/o/adaptive-media/image/" + imgFileEntryId + "/" + size + "/" + imgUuid />  --> 
216    <#local imgUrl = themeDisplay.getPortalURL() + "/o/adaptive-media/image/" + imgFileEntryId + "/" + size + "/" + imgName + "?" + imgTimeStamp/> 
217    <#return imgUrl > 
218</#function> 
219 
220<script> 
221    AUI().ready( 
222        function() { 
223            const lgContainer = document.getElementById('-DestinationGallery'); 
224            lightGallery(lgContainer, { 
225                licenseKey: '9N5TA-AWA8R-H9ZLD-GCJBW', 
226                plugins: [lgZoom, lgThumbnail, lgHash], 
227                selector: '.-Gallery-item', 
228                container: '#wrapper', 
229                download: false, 
230                speed: 500, 
231                thumbnail: true, 
232                mobileSettings: { 
233                    controls: false, 
234                    showCloseIcon: true, 
235                    download: false 
236
237            }); 
238 
239
240    ); 
241 
242    var rescroll = function() { 
243        var assetAnchor = document.querySelector("body:not(.has-control-menu) [id*=portlet_com_liferay_asset_publisher_] .asset-anchor"); 
244        if( assetAnchor ) { 
245            assetAnchor.scrollIntoView(); 
246
247        document.removeEventListener('scroll', rescroll); 
248
249    document.addEventListener('scroll', rescroll); 
250</script>