Navarro Gonzalez, Javier -- Micro Bio

テンプレート処理中にエラーが発生しました。
The following has evaluated to null or missing:
==> BackgroundSelect  [in template "20116#20152#31814" at line 42, column 33]

----
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: ${BackgroundSelect.getData()?js_string}  [in template "20116#20152#31814" at line 42, column 31]
	- Reached through: #assign imageName = "${BackgroundSele...  [in template "20116#20152#31814" at line 42, column 9]
----
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.kernel.service.AssetCategoryPropertyLocalService")/> 
13 
14<#-- Macro used to get specific field text from an Asset Entry --> 
15<#macro entryNode assetEntry field> 
16	<#assign document = saxReaderUtil.read(assetEntry.getContent())> 
17	<#if document.selectSingleNode("/root/dynamic-element[@name='"+field+"']/dynamic-content")??> 
18	"${document.selectSingleNode("/root/dynamic-element[@name='"+field+"']/dynamic-content").getText()?js_string}" 
19	<#else> 
20	"" 
21	</#if> 
22</#macro> 
23 
24<!-- Adjust portlet topper offset since bio goes to top of page --> 
25<style> 
26    header.portlet-topper { 
27        position: absolute !important; 
28        top: 33px !important; 
29        width: 100% !important; 
30
31</style> 
32 
33<div id="employeeBioDiv"></div> 
34<script> 
35	<#assign atkGroupId = company.getGroupId() /> 
36	<#assign DLFolderLocalService = serviceLocator.findService( 
37		"com.liferay.document.library.kernel.service.DLFolderLocalService")/> 
38	<#assign DLFileEntryLocalService = serviceLocator.findService( 
39		"com.liferay.document.library.kernel.service.DLFileEntryLocalService")/> 
40	<#assign bioParentFolder = DLFolderLocalService.getFolder(atkGroupId, 0, "Bios")/> 
41	<#assign logoFolder = DLFolderLocalService.getFolder(atkGroupId, bioParentFolder.getFolderId(), "Bio Backgrounds")/> 
42	<#assign imageName = "${BackgroundSelect.getData()?js_string}.jpg"/> 
43	 
44	var logoUrl; 
45	<#attempt> 
46		<#assign logoFile = DLFileEntryLocalService.getFileEntry(atkGroupId, logoFolder.getFolderId(), imageName)> 
47		logoUrl = "/documents/${atkGroupId}/${logoFolder.getFolderId()}/${logoFile.getTitle()}/${logoFile.getUuid()}?t=" + new Date().getTime(); 
48	<#recover> 
49		logoUrl = "/atk-dot-com-theme/images/atk-bio/City.jpg"; 
50	</#attempt> 
51	 
52	<#if DisplayHeadshot??> 
53		<#assign displayHeadshot = DisplayHeadshot.getData()> 
54	<#else> 
55		<#assign displayHeadshot = "" > 
56	</#if> 
57	 
58	var empInfo = { 
59		fullName: "${FullName.getData()?js_string}", 
60		preferredName: "${PreferredFirstName.getData()?js_string}", 
61		position: "${Position.getData()?js_string}", 
62		office: "${Office.getData()?js_string}", 
63		title: "${Title.getData()?js_string}", 
64		linkedIn: "${LinkedInURL.getData()?js_string}", 
65		headshotLocation: "${displayHeadshot}", 
66		headshotBackground: logoUrl, 
67		quote: "${Quote.getData()?js_string}", 
68		description: "${Description.getData()?js_string}" 
69	}; 
70		 
71		 
72	console.log(empInfo); 
73		 
74	<#assign industryVocabulary = AssetVocabularyLocalService.getGroupVocabulary(atkGroupId, "Industries")/> 
75	<#assign industryCategories = industryVocabulary.getCategories()/> 
76	 
77	var industryCategories = []; 
78	<#list industryCategories as category>  
79		<#assign categoryUrl = AssetCategoryPropertyLocalService.getCategoryProperty(category.categoryId, "url")/> 
80		industryCategories.push({  
81			id: "${category.categoryId}",  
82			name: "${category.name}",  
83			url: "${categoryUrl.value}",  
84		});  
85	</#list>  
86	 
87	var industries = []; 
88	<#if Industries.getSiblings()?has_content> 
89		<#list Industries.getSiblings() as cur_Industries> 
90			var defaultChecked = false; 
91			<#if getterUtil.getBoolean(cur_Industries.UseDefaultIndustryPage.getData())> 
92				defaultChecked = true; 
93			</#if> 
94			industries.push({  
95				title: "${cur_Industries.getData()?js_string}", 
96				customURL: "${cur_Industries.CustomIndustryURL.getData()?js_string}", 
97				useDefault: defaultChecked 
98			}); 
99		</#list> 
100	</#if> 
101	 
102	<#assign expertiseVocabulary = AssetVocabularyLocalService.getGroupVocabulary(atkGroupId, "Capabilities")/> 
103	<#assign expertiseCategories = expertiseVocabulary.getCategories()/> 
104	 
105	var expertiseCategories = []; 
106	<#list expertiseCategories as category>  
107	    <#attempt> 
108    		<#assign categoryUrl = AssetCategoryPropertyLocalService.getCategoryProperty(category.categoryId, "url")/> 
109    		expertiseCategories.push({  
110    			id: "${category.categoryId}",  
111    			name: "${category.name}",  
112    			url: "${categoryUrl.value}",  
113    		});  
114		 
115		<#recover> 
116		    console.log("could not find url property on capability category ${category?js_string}"); 
117		</#attempt> 
118	</#list> 
119 
120	var expertise = []; 
121	<#if Expertise?? && Expertise.getSiblings()?has_content> 
122		<#list Expertise.getSiblings() as cur_Expertise> 
123			var defaultChecked = false; 
124			<#if getterUtil.getBoolean(cur_Expertise.UseDefaultExpertisePage.getData())> 
125				defaultChecked = true; 
126			</#if> 
127			expertise.push({  
128				title: "${cur_Expertise.getData()?js_string}", 
129				customURL: "${cur_Expertise.CustomExpertiseURL.getData()?js_string}", 
130				useDefault: defaultChecked 
131			}); 
132		</#list> 
133	</#if> 
134 
135	 
136	var clientImpact = []; 
137	<#if ClientImpactTitle?? && ClientImpactTitle.getSiblings()?has_content>  
138		<#list ClientImpactTitle.getSiblings() as cur_ClientImpactTitle>  
139		 
140			var urlTitle = ""; 
141			<#assign jArt = "" /> 
142			<#if cur_ClientImpactTitle.impactUrlTitle?? && cur_ClientImpactTitle.impactUrlTitle.getData()?has_content> 
143				<#assign jArt = JournalArticleLocalService.getArticleByUrlTitle(atkGroupId, cur_ClientImpactTitle.impactUrlTitle.getData()) /> 
144				urlTitle = "${cur_ClientImpactTitle.impactUrlTitle.getData()?js_string}"; 
145			</#if> 
146 
147			var link = ""; 
148			<#if cur_ClientImpactTitle.ClientImpactLink?? && cur_ClientImpactTitle.ClientImpactLink.getData()?has_content> 
149				link = "${cur_ClientImpactTitle.ClientImpactLink.getData()?js_string}"; 
150			</#if> 
151			 
152			var title = ""; 
153			<#if cur_ClientImpactTitle?? && cur_ClientImpactTitle.getData()?has_content> 
154				title = "${cur_ClientImpactTitle.getData()?js_string}"; 
155			<#elseif jArt != ""> 
156				title = "${jArt.getTitle(locale)?js_string}"; 
157			</#if> 
158 
159			var subtitle = ""; 
160			<#if cur_ClientImpactTitle.ClientImpactText?? && cur_ClientImpactTitle.ClientImpactText.getData()?has_content> 
161				subtitle = "${cur_ClientImpactTitle.ClientImpactText.getData()?js_string}"; 
162			<#elseif jArt != ""> 
163				subtitle = <@entryNode assetEntry=jArt field="Subtitle"/>; 
164			</#if> 
165 
166			var svgMask = ""; 
167			<#if TextDecoration.getData()?has_content> 
168				svgMask = "${TextDecoration.getData()?js_string}"; 
169			<#elseif jArt != ""> 
170				svgMask = <@entryNode assetEntry=jArt field="SvgMask"/>; 
171			</#if> 
172 
173			var articleCategories = []; 
174			<#if jArt != ""> 
175				<#assign jAsset = AssetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", jArt.getResourcePrimKey()) /> 
176				<#assign assetCategories =  AssetCategoryLocalService.getAssetEntryAssetCategories(jAsset.getEntryId()) /> 
177					 
178				<#list assetCategories as category>  
179					<#assign categoryVocabulary = AssetVocabularyLocalService.getAssetVocabulary(category.getVocabularyId())> 
180					<#assign categoryUrl = AssetCategoryPropertyLocalService.getCategoryProperty(category.categoryId, "url")/> 
181					articleCategories.push({  
182						id: "${category.categoryId}",  
183						name: "${category.name}", 
184						url: "${categoryUrl.value}", 
185						vocabularyName: "${categoryVocabulary.getName()?js_string}",  
186					});  
187				</#list> 
188			</#if> 
189		 
190			clientImpact.push({ 
191				slug: "Client Impact", 
192				title: title, 
193				description: subtitle, 
194				largeDescriptionText: 'false', 
195				link: link, 
196				urlTitle: urlTitle, 
197				categories: articleCategories, 
198				displayType: "Bio Feature", 
199				svgMaskURL: svgMask  
200			}); 
201		</#list>  
202	</#if> 
203 
204    if (clientImpact.length > 0) { 
205        <#if SmallerPrimaryClientImpactTitle??> 
206            clientImpact[0].useSmallerTitle = !${getterUtil.getBoolean(SmallerPrimaryClientImpactTitle.getData())?c} 
207        <#else> 
208            clientImpact[0].useSmallerTitle = false; 
209        </#if> 
210         
211        <#if SmallerPrimaryClientImpactSubtitle??> 
212            clientImpact[0].largeDescriptionText = '' + (!${getterUtil.getBoolean(SmallerPrimaryClientImpactSubtitle.getData())?c}); 
213        <#else> 
214            clientImpact[0].largeDescriptionText = 'true'; 
215        </#if> 
216
217     
218    if (clientImpact[0].useSmallerTitle) { 
219        clientImpact[0].titleTextSize = 'heading1'; 
220    } else { 
221        clientImpact[0].titleTextSize = 'heading2'; 
222
223 
224	var perspectives = []; 
225	<#if PerspectiveTitle?? && PerspectiveTitle.getSiblings()?has_content>  
226		<#list PerspectiveTitle.getSiblings() as cur_PerspectiveTitle>  
227			perspectives.push({ 
228				title: "${cur_PerspectiveTitle.getData()?js_string}", 
229				link: "${cur_PerspectiveTitle.PerspectiveLink.getData()?js_string}", 
230			}); 
231		</#list>  
232	</#if> 
233	 
234	<#assign DDLRecordSetLocalService = serviceLocator.findService( 
235		"com.liferay.dynamic.data.lists.service.DDLRecordSetLocalService")/> 
236	<#assign PropertyFactoryUtil = serviceLocator.findService( 
237		"com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil") /> 
238	<#assign query = DDLRecordSetLocalService.dynamicQuery().add(PropertyFactoryUtil.forName("name").like("%Bio%")) > 
239    <#assign recordsets = DDLRecordSetLocalService.dynamicQuery(query) > 
240    <#list recordsets as set>  
241    	<#assign recordset = set > 
242    </#list> 
243    <#assign recordSetId = recordset.getPrimaryKey()> 
244    <#assign structure = recordset.getDDMStructure() > 
245    <#assign JSONFactory = serviceLocator.findService( 
246    	"com.liferay.portal.kernel.json.JSONFactory")/> 
247    <#assign definition = JSONFactory.createJSONObject(structure.getDefinition()) > 
248    <#assign description = structure.getDescription("en_US") > 
249     
250    <#assign name = structure.getName("en_US") > 
251     
252    var formData = { 
253    	configuration: {formId: ${recordSetId}}, 
254    	definition: ${definition}, 
255    	description: "${description}", 
256    	name: "${name}" 
257
258     
259 
260ATK.React.App.EmployeeBio('employeeBioDiv', empInfo, industries, industryCategories, expertise, expertiseCategories, clientImpact, perspectives, formData);  </script>