Navarro Gonzalez, Javier -- Micro Bio

An error occurred while processing the template.
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        urlTitle: "${.vars['reserved-article-url-title'].data?js_string}" 
70    }; 
71 
72 
73    console.log(empInfo); 
74 
75	<#assign industryVocabulary = AssetVocabularyLocalService.getGroupVocabulary(atkGroupId, "Industries")/> 
76	<#assign industryCategories = industryVocabulary.getCategories()/> 
77 
78    var industryCategories = []; 
79	<#list industryCategories as category> 
80		<#assign categoryUrl = AssetCategoryPropertyLocalService.getCategoryProperty(category.categoryId, "url")/> 
81    industryCategories.push({ 
82        id: "${category.categoryId}", 
83        name: "${category.name}", 
84        url: "${categoryUrl.value}", 
85    }); 
86	</#list> 
87 
88    var industries = []; 
89	<#if Industries.getSiblings()?has_content> 
90		<#list Industries.getSiblings() as cur_Industries> 
91        var defaultChecked = false; 
92			<#if getterUtil.getBoolean(cur_Industries.UseDefaultIndustryPage.getData())> 
93            defaultChecked = true; 
94			</#if> 
95        industries.push({ 
96            title: "${cur_Industries.getData()?js_string}", 
97            customURL: "${cur_Industries.CustomIndustryURL.getData()?js_string}", 
98            useDefault: defaultChecked 
99        }); 
100		</#list> 
101	</#if> 
102 
103	<#assign expertiseVocabulary = AssetVocabularyLocalService.getGroupVocabulary(atkGroupId, "Capabilities")/> 
104	<#assign expertiseCategories = expertiseVocabulary.getCategories()/> 
105 
106    var expertiseCategories = []; 
107	<#list expertiseCategories as category> 
108		<#attempt> 
109			<#assign categoryUrl = AssetCategoryPropertyLocalService.getCategoryProperty(category.categoryId, "url")/> 
110        expertiseCategories.push({ 
111            id: "${category.categoryId}", 
112            name: "${category.name}", 
113            url: "${categoryUrl.value}", 
114        }); 
115 
116			<#recover> 
117            console.log("could not find url property on capability category ${category?js_string}"); 
118		</#attempt> 
119	</#list> 
120 
121    var expertise = []; 
122	<#if Expertise?? && Expertise.getSiblings()?has_content> 
123		<#list Expertise.getSiblings() as cur_Expertise> 
124        var defaultChecked = false; 
125			<#if getterUtil.getBoolean(cur_Expertise.UseDefaultExpertisePage.getData())> 
126            defaultChecked = true; 
127			</#if> 
128        expertise.push({ 
129            title: "${cur_Expertise.getData()?js_string}", 
130            customURL: "${cur_Expertise.CustomExpertiseURL.getData()?js_string}", 
131            useDefault: defaultChecked 
132        }); 
133		</#list> 
134	</#if> 
135 
136 
137    var clientImpact = []; 
138	<#if ClientImpactTitle?? && ClientImpactTitle.getSiblings()?has_content> 
139		<#list ClientImpactTitle.getSiblings() as cur_ClientImpactTitle> 
140 
141        var impactUrlTitle = ""; 
142			<#assign jArt = "" /> 
143			<#if cur_ClientImpactTitle.impactUrlTitle?? && cur_ClientImpactTitle.impactUrlTitle.getData()?has_content> 
144				<#assign jArt = JournalArticleLocalService.getArticleByUrlTitle(atkGroupId, cur_ClientImpactTitle.impactUrlTitle.getData()) /> 
145            impactUrlTitle = "${cur_ClientImpactTitle.impactUrlTitle.getData()?js_string}"; 
146			</#if> 
147 
148        var link = ""; 
149			<#if cur_ClientImpactTitle.ClientImpactLink?? && cur_ClientImpactTitle.ClientImpactLink.getData()?has_content> 
150            link = "${cur_ClientImpactTitle.ClientImpactLink.getData()?js_string}"; 
151			</#if> 
152 
153        var title = ""; 
154			<#if cur_ClientImpactTitle?? && cur_ClientImpactTitle.getData()?has_content> 
155            title = "${cur_ClientImpactTitle.getData()?js_string}"; 
156			<#elseif jArt != ""> 
157            title = "${jArt.getTitle(locale)?js_string}"; 
158			</#if> 
159 
160        var subtitle = ""; 
161			<#if cur_ClientImpactTitle.ClientImpactText?? && cur_ClientImpactTitle.ClientImpactText.getData()?has_content> 
162            subtitle = "${cur_ClientImpactTitle.ClientImpactText.getData()?js_string}"; 
163			<#elseif jArt != ""> 
164            subtitle = <@entryNode assetEntry=jArt field="Subtitle"/>; 
165			</#if> 
166 
167        var svgMask = ""; 
168			<#if TextDecoration.getData()?has_content> 
169            svgMask = "${TextDecoration.getData()?js_string}"; 
170			<#elseif jArt != ""> 
171            svgMask = <@entryNode assetEntry=jArt field="SvgMask"/>; 
172			</#if> 
173 
174        var articleCategories = []; 
175			<#if jArt != ""> 
176				<#assign jAsset = AssetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", jArt.getResourcePrimKey()) /> 
177				<#assign assetCategories =  AssetCategoryLocalService.getAssetEntryAssetCategories(jAsset.getEntryId()) /> 
178 
179				<#list assetCategories as category> 
180					<#assign categoryVocabulary = AssetVocabularyLocalService.getAssetVocabulary(category.getVocabularyId())> 
181					<#assign categoryUrl = AssetCategoryPropertyLocalService.getCategoryProperty(category.categoryId, "url")/> 
182                articleCategories.push({ 
183                    id: "${category.categoryId}", 
184                    name: "${category.name}", 
185                    url: "${categoryUrl.value}", 
186                    vocabularyName: "${categoryVocabulary.getName()?js_string}", 
187                }); 
188				</#list> 
189			</#if> 
190 
191        clientImpact.push({ 
192            slug: "Client Impact", 
193            title: title, 
194            description: subtitle, 
195            largeDescriptionText: 'false', 
196            link: link, 
197            urlTitle: impactUrlTitle, 
198            categories: articleCategories, 
199            displayType: "Bio Feature", 
200            svgMaskURL: svgMask 
201        }); 
202		</#list> 
203	</#if> 
204 
205    if (clientImpact.length > 0) { 
206	<#if SmallerPrimaryClientImpactTitle??> 
207            clientImpact[0].useSmallerTitle = !${getterUtil.getBoolean(SmallerPrimaryClientImpactTitle.getData())?c} 
208	<#else> 
209            clientImpact[0].useSmallerTitle = false; 
210	</#if> 
211 
212	<#if SmallerPrimaryClientImpactSubtitle??> 
213        clientImpact[0].largeDescriptionText = '' + (!${getterUtil.getBoolean(SmallerPrimaryClientImpactSubtitle.getData())?c}); 
214	<#else> 
215        clientImpact[0].largeDescriptionText = 'true'; 
216	</#if> 
217
218 
219    if (clientImpact[0].useSmallerTitle) { 
220        clientImpact[0].titleTextSize = 'heading1'; 
221    } else { 
222        clientImpact[0].titleTextSize = 'heading2'; 
223
224 
225    var perspectives = []; 
226	<#if PerspectiveTitle?? && PerspectiveTitle.getSiblings()?has_content> 
227		<#list PerspectiveTitle.getSiblings() as cur_PerspectiveTitle> 
228        perspectives.push({ 
229            title: "${cur_PerspectiveTitle.getData()?js_string}", 
230            link: "${cur_PerspectiveTitle.PerspectiveLink.getData()?js_string}", 
231        }); 
232		</#list> 
233	</#if> 
234 
235	<#assign DDLRecordSetLocalService = serviceLocator.findService( 
236	"com.liferay.dynamic.data.lists.service.DDLRecordSetLocalService")/> 
237	<#assign PropertyFactoryUtil = serviceLocator.findService( 
238	"com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil") /> 
239	<#assign query = DDLRecordSetLocalService.dynamicQuery().add(PropertyFactoryUtil.forName("name").like("%Bio%")) > 
240	<#assign recordsets = DDLRecordSetLocalService.dynamicQuery(query) > 
241	<#list recordsets as set> 
242		<#assign recordset = set > 
243	</#list> 
244    <#assign recordSetId = recordset.getPrimaryKey()> 
245	<#assign recordSetUUID = recordset.getUuid()> 
246	<#assign structure = recordset.getDDMStructure() > 
247	<#assign JSONFactory = serviceLocator.findService( 
248	"com.liferay.portal.kernel.json.JSONFactory")/> 
249	<#assign definition = JSONFactory.createJSONObject(structure.getDefinition()) > 
250	<#assign description = structure.getDescription("en_US") > 
251 
252	<#assign name = structure.getName("en_US") > 
253 
254    var recordSetId = ${recordSetId}; 
255    var recordSetUUID = '${recordSetUUID}'; 
256    var formId; 
257 
258    if(window.location.host.indexOf("atkearney.com") >= 0) { 
259    	formId = recordSetId; 
260    } else { 
261    	formId = recordSetUUID; 
262
263 
264    var formData = { 
265        configuration: {formId: formId}, 
266        definition: ${definition}, 
267        description: "${description}", 
268        name: "${name}" 
269    }; 
270 
271 
272    ATK.React.App.EmployeeBio('employeeBioDiv', empInfo, industries, industryCategories, expertise, expertiseCategories, clientImpact, perspectives, formData);  </script>