テンプレート処理中にエラーが発生しました。
The following has evaluated to null or missing: ==> FullName.getData()?split(" ")[1] [in template "20116#20152#31814" at line 278, column 58] ---- 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: ${FullName.getData()?split(" ")[1]} [in template "20116#20152#31814" at line 278, column 56] ----
1<#-- Web content templates are used to lay out the fields defined in a web content structure. Please use the left panel to quickly add commonly used variables. Autocomplete is also available and can be invoked by typing "${". -->
2
3<#assign JournalArticleLocalService = serviceLocator.findService(
4"com.liferay.journal.service.JournalArticleLocalService")>
5<#assign AssetEntryLocalService = serviceLocator.findService(
6"com.liferay.asset.kernel.service.AssetEntryLocalService")>
7<#assign AssetCategoryLocalService = serviceLocator.findService(
8"com.liferay.asset.kernel.service.AssetCategoryLocalService")>
9<#assign AssetVocabularyLocalService = serviceLocator.findService(
10"com.liferay.asset.kernel.service.AssetVocabularyLocalService")>
11<#assign AssetCategoryPropertyLocalService = serviceLocator.findService(
12"com.liferay.asset.category.property.service.AssetCategoryPropertyLocalService")/>
13<#assign AssetLinkLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService")>
14<#assign GroupLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService")>
15<#assign CurrentJournalArticle = JournalArticleLocalService.getLatestArticle(groupId,.vars['reserved-article-id'].data)>
16<#assign CurrentAssetEntry = AssetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle",CurrentJournalArticle.getResourcePrimKey())>
17<#assign AssetLinks = AssetLinkLocalService.getReverseLinks(CurrentAssetEntry.getEntryId(), 0)>
18
19<#assign TemplateCustomService = serviceLocator.findService("template.custom.services.TemplateCustomService") />
20<!-- update name here if change asset library name -->
21<#assign assetLibGroup = GroupLocalService.getGroup(themeDisplay.getCompanyId(), "Kearney Global Asset Library") />
22<#assign DLFolderLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFolderLocalService")/>
23<#assign DLFileEntryLocalService = serviceLocator.findService(
24 "com.liferay.document.library.kernel.service.DLFileEntryLocalService")/>
25<#if assetLibGroup?? >
26 <#assign assetLibGroupId = assetLibGroup.getGroupId() />
27</#if>
28<#assign bioParentFolder = DLFolderLocalService.getFolder(assetLibGroupId, 0, "Bios")/>
29<#assign logoFolder = DLFolderLocalService.getFolder(assetLibGroupId, bioParentFolder.getFolderId(), "Bio Backgrounds")/>
30<#assign atkGroupId = company.getGroupId() />
31<#assign imageName = "${BackgroundSelect.getData()?js_string}.jpg"/>
32<#assign layoutUrl = themeDisplay.getLayout().getFriendlyURL()/>
33
34<#-- Macro used to get specific field text from an Asset Entry -->
35<#macro entryNode assetEntry field>
36 <#assign document = saxReaderUtil.read(assetEntry.getContent())>
37 <#if document.selectSingleNode("/root/dynamic-element[@name='"+field+"']/dynamic-content")??>
38 "${document.selectSingleNode("/root/dynamic-element[@name='"+field+"']/dynamic-content").getText()?js_string}"
39 <#else>
40 ""
41 </#if>
42</#macro>
43
44<!-- Adjust portlet topper offset since bio goes to top of page -->
45<style>
46 header.portlet-topper {
47 position: absolute !important;
48 top: 33px !important;
49 width: 100% !important;
50 }
51</style>
52
53<div id="employeeBioDiv"></div>
54<script>
55 var logoUrl;
56 <#attempt>
57 <#assign logoFile = DLFileEntryLocalService.getFileEntry(assetLibGroupId, logoFolder.getFolderId(), imageName)>
58 logoUrl = "/documents/${assetLibGroupId}/${logoFolder.getFolderId()}/${logoFile.getTitle()}/${logoFile.getUuid()}?t=" + new Date().getTime();
59 <#recover>
60 logoUrl = "/atk-dot-com-theme/images/atk-bio/City.jpg";
61 </#attempt>
62
63 <#if DisplayHeadshot??>
64 <#assign displayHeadshot = DisplayHeadshot.getData()>
65 <#else>
66 <#assign displayHeadshot = "" >
67 </#if>
68
69 var empInfo = {
70 fullName: "${FullName.getData()?js_string}",
71 preferredName: "${PreferredFirstName.getData()?js_string}",
72 position: "${Position.getData()?js_string}",
73 office: "${Office.getData()?js_string}",
74 title: "${Title.getData()?js_string}",
75 linkedIn: "${LinkedInURL.getData()?js_string}",
76 headshotLocation: "${displayHeadshot}",
77 headshotBackground: logoUrl,
78 quote: "${Quote.getData()?js_string}",
79 description: "${Description.getData()?js_string}",
80 urlTitle: "${.vars['reserved-article-url-title'].data?js_string}"
81 };
82
83 <#assign industryVocabulary = AssetVocabularyLocalService.getGroupVocabulary(atkGroupId, "Industries")/>
84 <#assign industryCategories = industryVocabulary.getCategories()/>
85
86 var industryCategories = [];
87 <#list industryCategories as category>
88 <#assign categoryUrl = AssetCategoryPropertyLocalService.getCategoryProperty(category.categoryId, "url")/>
89 industryCategories.push({
90 id: "${category.categoryId}",
91 name: "${category.name}",
92 url: "${categoryUrl.value}",
93 });
94 </#list>
95
96 var industries = [];
97 <#if Industries.getSiblings()?has_content>
98 <#list Industries.getSiblings() as cur_Industries>
99 var defaultChecked = false;
100 <#if getterUtil.getBoolean(cur_Industries.UseDefaultIndustryPage.getData())>
101 defaultChecked = true;
102 </#if>
103 industries.push({
104 title: "${cur_Industries.getData()?js_string}",
105 customURL: "${cur_Industries.CustomIndustryURL.getData()?js_string}",
106 useDefault: defaultChecked
107 });
108 </#list>
109 </#if>
110
111 <#assign expertiseVocabulary = AssetVocabularyLocalService.getGroupVocabulary(atkGroupId, "Capabilities")/>
112 <#assign expertiseCategories = expertiseVocabulary.getCategories()/>
113
114 var expertiseCategories = [];
115 <#list expertiseCategories as category>
116 <#attempt>
117 <#assign categoryUrl = AssetCategoryPropertyLocalService.getCategoryProperty(category.categoryId, "url")/>
118 expertiseCategories.push({
119 id: "${category.categoryId}",
120 name: "${category.name}",
121 url: "${categoryUrl.value}",
122 });
123
124 <#recover>
125 console.log("could not find url property on capability category ${category?js_string}");
126 </#attempt>
127 </#list>
128
129 var expertise = [];
130 <#if Expertise?? && Expertise.getSiblings()?has_content>
131 <#list Expertise.getSiblings() as cur_Expertise>
132 var defaultChecked = false;
133 <#if getterUtil.getBoolean(cur_Expertise.UseDefaultExpertisePage.getData())>
134 defaultChecked = true;
135 </#if>
136 expertise.push({
137 title: "${cur_Expertise.getData()?js_string}",
138 customURL: "${cur_Expertise.CustomExpertiseURL.getData()?js_string}",
139 useDefault: defaultChecked
140 });
141 </#list>
142 </#if>
143
144
145 var clientImpact = [];
146 <#if ClientImpactTitle?? && ClientImpactTitle.getSiblings()?has_content>
147 <#list ClientImpactTitle.getSiblings() as cur_ClientImpactTitle>
148
149 var impactUrlTitle = "";
150 <#assign jArt = "" />
151 <#if cur_ClientImpactTitle.impactUrlTitle?? && cur_ClientImpactTitle.impactUrlTitle.getData()?has_content>
152 <#assign jArt = JournalArticleLocalService.getArticleByUrlTitle(assetLibGroupId, cur_ClientImpactTitle.impactUrlTitle.getData()) />
153 impactUrlTitle = "${cur_ClientImpactTitle.impactUrlTitle.getData()?js_string}";
154 </#if>
155
156 var link = "";
157 <#if cur_ClientImpactTitle.ClientImpactLink?? && cur_ClientImpactTitle.ClientImpactLink.getData()?has_content>
158 link = "${cur_ClientImpactTitle.ClientImpactLink.getData()?js_string}";
159 </#if>
160
161 var title = "";
162 <#if cur_ClientImpactTitle?? && cur_ClientImpactTitle.getData()?has_content>
163 title = "${cur_ClientImpactTitle.getData()?js_string}";
164 <#elseif jArt != "">
165 title = "${jArt.getTitle(locale)?js_string}";
166 </#if>
167
168 var subtitle = "";
169 <#if cur_ClientImpactTitle.ClientImpactText?? && cur_ClientImpactTitle.ClientImpactText.getData()?has_content>
170 subtitle = "${cur_ClientImpactTitle.ClientImpactText.getData()?js_string}";
171 <#elseif jArt != "">
172 subtitle = <@entryNode assetEntry=jArt field="Subtitle"/>;
173 </#if>
174
175 var svgMask = "";
176 <#if TextDecoration.getData()?has_content>
177 svgMask = "${TextDecoration.getData()?js_string}";
178 <#elseif jArt != "">
179 svgMask = <@entryNode assetEntry=jArt field="SvgMask"/>;
180 </#if>
181
182 var articleCategories = [];
183 <#if jArt != "">
184 <#assign jAsset = AssetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", jArt.getResourcePrimKey()) />
185 <#assign assetCategories = AssetCategoryLocalService.getAssetEntryAssetCategories(jAsset.getEntryId()) />
186
187 <#list assetCategories as category>
188 <#assign categoryVocabulary = AssetVocabularyLocalService.getAssetVocabulary(category.getVocabularyId())>
189 <#assign categoryUrl = AssetCategoryPropertyLocalService.getCategoryProperty(category.categoryId, "url")/>
190 articleCategories.push({
191 id: "${category.categoryId}",
192 name: "${category.name}",
193 url: "${categoryUrl.value}",
194 vocabularyName: "${categoryVocabulary.getName()?js_string}",
195 });
196 </#list>
197 </#if>
198
199 clientImpact.push({
200 slug: "Client Impact",
201 title: title,
202 description: subtitle,
203 largeDescriptionText: 'false',
204 link: link,
205 urlTitle: impactUrlTitle,
206 categories: articleCategories,
207 displayType: "Bio Feature",
208 svgMaskURL: svgMask
209 });
210 </#list>
211 </#if>
212
213 if (clientImpact.length > 0) {
214 <#if SmallerPrimaryClientImpactTitle??>
215 clientImpact[0].useSmallerTitle = !${getterUtil.getBoolean(SmallerPrimaryClientImpactTitle.getData())?c};
216 <#else>
217 clientImpact[0].useSmallerTitle = false;
218 </#if>
219
220 <#if SmallerPrimaryClientImpactSubtitle??>
221 clientImpact[0].largeDescriptionText = '' + (!${getterUtil.getBoolean(SmallerPrimaryClientImpactSubtitle.getData())?c});
222 <#else>
223 clientImpact[0].largeDescriptionText = 'true';
224 </#if>
225 }
226
227 if (clientImpact[0].useSmallerTitle) {
228 clientImpact[0].titleTextSize = 'heading1';
229 } else {
230 clientImpact[0].titleTextSize = 'heading2';
231 }
232
233 var perspectives = [];
234 <#if PerspectiveTitle?has_content && PerspectiveTitle.getSiblings()?has_content>
235 <#list PerspectiveTitle.getSiblings() as cur_PerspectiveTitle>
236 <#if cur_PerspectiveTitle.getData()?has_content && cur_PerspectiveTitle.PerspectiveLink.getData()?has_content>
237 perspectives.push({
238 title: "${cur_PerspectiveTitle.getData()?js_string}",
239 link: "${cur_PerspectiveTitle.PerspectiveLink.getData()?js_string}",
240 });
241 </#if>
242 </#list>
243 </#if>
244
245
246 var formData = {};
247 <#assign recordset = TemplateCustomService.getBioDDMDdmFormInstance() >
248 <#if recordset??>
249 <#assign recordSetUUID = recordset.getUuid()>
250 <#assign structure = recordset.getStructure() >
251 <#assign JSONFactory = serviceLocator.findService(
252 "com.liferay.portal.kernel.json.JSONFactory")/>
253 <#assign definition = JSONFactory.createJSONObject(structure.getDefinition()) >
254 <#assign description = structure.getDescription("en_US") >
255
256 <#assign name = structure.getName("en_US") >
257
258 formData = {
259 configuration: {formId: '${recordSetUUID}'},
260 definition: ${definition},
261 description: "${description}",
262 name: "${name}"
263 }
264 </#if>
265
266
267
268 ATK.React.App.EmployeeBio('employeeBioDiv', empInfo, industries, industryCategories, expertise, expertiseCategories, clientImpact, perspectives, formData); </script>
269<#compress>
270 <script type="application/ld+json">
271 {
272 "@context": "https://schema.org/",
273 "@type": "ProfilePage",
274 "mainEntity": {
275 "@type": "Person",
276 "name": "<#if (FullName.getData())??>${FullName.getData()}</#if>",
277 "givenName": "<#if (PreferredFirstName.getData())??>${PreferredFirstName.getData()}</#if>",
278 "familyName": "<#if (FullName.getData())??>${FullName.getData()?split(" ")[1]}</#if>",
279 "url": "https://www.kearney.com${layoutUrl}",
280 "image": "<#if (DisplayHeadshot.getData())??>${"https://www.kearney.com" + DisplayHeadshot.getData()}</#if>",
281 "jobTitle": "<#if (Title.getData())??>${Title.getData()}</#if>",
282 "worksFor": {
283 "@id": "https://www.kearney.com#organization"
284 },
285 "sameAs": [
286 "<#if (LinkedInURL.getData())??>${LinkedInURL.getData()}</#if>"
287 ]
288 }
289 }
290 </script>
291</#compress>