Fel uppstod under bearbetning av mallen.
The following has evaluated to null or missing:
==> qstringmap["ecdma-lc"] [in template "10154#10192#18387089" at line 19, column 15]
----
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: #assign lc = qstringmap["ecdma-lc"]?f... [in template "10154#10192#18387089" at line 19, column 1]
----
1<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! />
2<#assign oadURL = propsUtil.get('elan.oad.url') >
3<#assign serviceContext = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"].getServiceContext() >
4<#assign themeDisplay = serviceContext.getThemeDisplay() />
5<#assign url = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent()/>
6<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))>
7<#assign url404 = '/error/404.html' >
8<#assign environment = url?replace('/11t3.*','','r')>
9
10<#assign text_to_apply_source = "vanity url" >
11<#if qstringmap["sms"]?has_content>
12 <#assign sms = 1 >
13 <#assign text_to_apply_source = "sms" >
14</#if>
15<#if qstringmap["qrCode"]?has_content>
16 <#assign text_to_apply_source = "qr code" >
17</#if>
18
19<#assign lc = qstringmap["ecdma-lc"]?first>
20<#assign lc = htmlUtil.escape(lc)>
21<#assign lc = htmlUtil.escapeJS(lc)>
22
23<#assign prefix = "00000" >
24<#assign lcWithPrefix = prefix + lc >
25<#assign withPrefixLength = lcWithPrefix?length >
26<#assign startHere = withPrefixLength - 5>
27<#assign lc = lcWithPrefix?substring(startHere)>
28
29<#if qstringmap["ecid"]?has_content>
30 <#assign ecidExt = qstringmap["ecid"]?first>
31 <#assign ecidExt = htmlUtil.escape(ecidExt)>
32 <#assign ecidExt = htmlUtil.escapeJS(ecidExt)>
33 <#assign ecidExt = "&ecid=" + ecidExt>
34
35
36 <#assign campaignId = qstringmap["ecid"]?first >
37 <#assign campaignId = htmlUtil.escape(campaignId)>
38 <#assign campaignId = htmlUtil.escapeJS(campaignId)>
39<#else>
40 <#assign ecidExt="">
41 <#assign campaignId = "" >
42</#if>
43
44<#assign isFromDCOLink = false>
45<#assign dcoSourceCode = ''>
46<#if qstringmap["sourcecode"]?has_content>
47 <#assign dcoSourceCode = qstringmap["sourcecode"]?first>
48 <#assign dcoSourceCode = htmlUtil.escape(dcoSourceCode)>
49 <#assign dcoSourceCode = htmlUtil.escapeJS(dcoSourceCode)>
50<#elseif qstringmap["sourceCode"]?has_content>
51 <#assign dcoSourceCode = qstringmap["sourceCode"]?first>
52 <#assign dcoSourceCode = htmlUtil.escape(dcoSourceCode)>
53 <#assign dcoSourceCode = htmlUtil.escapeJS(dcoSourceCode)>
54</#if>
55
56<#if dcoSourceCode?has_content>
57 <#assign isFromDCOLink = true>
58</#if>
59
60<#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! />
61<#assign clientProfileList = clientProfileService.findByLocationCode(lc)>
62<#assign clientProfile = clientProfileList?first>
63<#assign partnerName = clientProfile.getMarketingNameLong()>
64<#assign pbu = clientProfile.getPbu()>
65<#assign subbu = clientProfile.getSUBBRANDBUNBR()>
66
67<#assign logoFileName = clientProfile.getLogoBFormat1()?replace(".", "-")?replace("-([^-]*)$", ".$1", "r")?lower_case>
68<#assign cdnLogoUrl = (propsUtil.get('rackspace.cdn.web.url'))!>
69<#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&'+pbu+'&'+subbu)>
70
71 <#assign clientDataService = (serviceLocator.findService("com.elan.crc.user.service.CrcPbuLocalService"))! />
72<#assign clientProfileDataList = clientDataService.getByPbuAndSubBu(pbu,subbu)>
73<#assign partnerUrl = clientProfileDataList.getPartnerMainUrl()>
74<script>
75//console.log('Partner URL', ${partnerUrl});
76</script>
77<#if partnerUrl?has_content && !partnerUrl?matches(r"(?i)^https?\:\/\/.*")>
78 <#assign partnerUrl = 'https://' + partnerUrl>
79</#if>
80<script>
81//console.log('Partner URL', ${partnerUrl});
82
83</script>
84<#-- Begin: filter duplicated cards-->
85<#assign temp = []>
86<#assign offerTypeList = []>
87<#if (fiCardsData?size > 0)>
88
89
90<!-- redirect to PANO start -->
91<!-- parse URL for page to determine product -->
92<#if (fiCardsData?first.redirectToPANO == "1")>
93 <#assign pageend = url?index_of("?") - 1 >
94 <#assign urlwoquery = url[0..pageend] >
95 <#assign pagestart = urlwoquery?last_index_of("/") + 1 >
96 <#assign productURL = urlwoquery[pagestart..] >
97 <#assign qstringonly = httpUtil.getQueryString(url) >
98
99 <#if (productURL == "consumer-platinum")>
100 <#assign PANOofferType = "108">
101 <#elseif (productURL == "zero-plus")>
102 <#assign PANOofferType = "109">
103 <#elseif (productURL == "zero-plus-business")>
104 <#assign PANOofferType = "132">
105 <#elseif (productURL == "max-cash")>
106 <#assign PANOofferType = "104">
107 <#elseif (productURL == "consumer-edr")>
108 <#assign PANOofferType = "101">
109 <!-- PANOofferType = "103" -->
110 <#elseif (productURL == "secured")>
111 <#assign PANOofferType = "115">
112 <#elseif (productURL == "smart-business-rewards")>
113 <#assign PANOofferType = "144">
114 <#elseif (productURL == "business-cash-preferred")>
115 <#assign PANOofferType = "128">
116 <#elseif (productURL == "business-real-rewards")>
117 <#assign PANOofferType = "143">
118 <#elseif (productURL == "business-platinum")>
119 <#assign PANOofferType = "121">
120 <#elseif (productURL == "max-cash-secured")>
121 <#assign PANOofferType = "147">
122 <#elseif (productURL == "college-real-rewards")>
123 <#assign PANOofferType = "141">
124 <#elseif (productURL == "travel-rewards-plus")>
125 <#assign PANOofferType = "138">
126 <#elseif (productURL == "reserve-rewards-plus")>
127 <#assign PANOofferType = "154">
128 <#else>
129 <#assign PANOofferType = "0">
130 </#if>
131 <#assign redirectToPANO = 'https://www.mycardapply.com/synindex?' + qstringonly + "&offertype=" + PANOofferType >
132 <script>
133 console.log('${productURL}');
134 console.log('${PANOofferType}');
135 console.log('${redirectToPANO}');
136 <!-- append #business to PANO Redirect URL if current URL contains #business. PANO uses this to show business tab as selected -->
137 if(window.location.href.includes('#business')){
138 location.href = '${redirectToPANO}'+'#business';
139 } else {
140 location.href = '${redirectToPANO}';
141 }
142 </script>
143</#if>
144<!-- redirect to PANO end -->
145
146
147 <#assign index = 0>
148 <#list fiCardsData as fib>
149 <#if (fib.offerType?has_content && !(offerTypeList?seq_contains(fib.offerType)))>
150 <#assign offerTypeList = offerTypeList + [fib.offerType]>
151 <#assign temp = temp + fiCardsData[index..index]>
152 </#if>
153 <#assign index = index + 1>
154 </#list>
155 <#assign fiCardsData = temp>
156 <#if (fiCardsData?size > 0)>
157 <div class="content-container content-container-main">
158 <#if url?contains("index")>
159 <#assign product="All Cards">
160 <h1 class="sr-only">${partnerName!'Elan'} Credit Cards</h1>
161 <header class="page-header">
162 <div class="page-header__logo">
163 <#if partnerUrl?has_content>
164 <a href="${partnerUrl!''}">
165 <img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''} Logo">
166 </a>
167 <#else>
168 <img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''} Logo">
169 </#if>
170 </div>
171 </header>
172 <#else>
173 <header class="page-header">
174 <#if !isFromDCOLink>
175 <div class="back-overview hide-desktop">
176 <a href="${environment}/11t3/index?ecdma-lc=${lc}${ecidExt}">Home</a>
177 </div>
178 </#if>
179
180 <div class="header-main-logo">
181 <#if partnerUrl?has_content>
182 <a href="${partnerUrl!''}">
183 <img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''} Logo">
184 </a>
185 <#else>
186 <img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''} Logo">
187 </#if>
188 </div>
189 <#if !isFromDCOLink>
190 <div class="styled-select slate">
191 <nav class="styled-select__dropdown">
192 <div class="back-overview hide-mobile-flex">
193 <a href="${environment}/11t3/index?ecdma-lc=${lc}${ecidExt}">Home</a>
194 </div>
195 <a href="javascript:void(0)" class="dropdown-select" aria-expanded="false">
196 <span class="selected-option"></span>
197 <div class="jn-arrow arrow arrow-right"></div>
198 </a>
199 <a href="javascript:void(0)" aria-label="Open page navigation menu" class="jn-hamburger hamburger" aria-expanded="false">
200 <div class="first-line transform transformed1"></div>
201 <div></div>
202 <div class="transform transformed2"></div>
203 <div></div>
204 </a>
205 <ul>
206 <#list fiCardsData as fib>
207 <#switch fib.offerType>
208 <#case "101">
209 <#assign productURL = "202302/consumer-edr">
210 <#assign productName = "Everyday Rewards+">
211 <#break>
212 <#case "103">
213 <#assign productURL = "202302/consumer-edr">
214 <#assign productName = "Everyday Rewards+">
215 <#break>
216 <#case "104">
217 <#assign productURL = "max-cash">
218 <#assign productName = "Max Cash Preferred Card">
219 <#break>
220 <#case "108">
221 <#assign productURL="202308/consumer-platinum">
222 <#assign productName="Platinum Card">
223 <#break>
224 <#case "109">
225 <#assign productURL="202308/consumer-platinum">
226 <#assign productName="Platinum Card">
227 <#break>
228 <#case "115">
229 <#assign productURL = "secured">
230 <#assign productName = "Secured Card" >
231 <#break>
232 <#case "138">
233 <#assign productURL = "202305/travel-rewards-plus">
234 <#assign productName = "Travel Rewards+" >
235 <#break>
236 <#case "141">
237 <#assign productURL = "college-real-rewards">
238 <#assign productName = "College Real Rewards" >
239 <#break>
240 <#case "147">
241 <#assign productURL = "max-cash-secured">
242 <#assign productName = "Max Cash Secured Card" >
243 <#break>
244 <#case "154">
245 <#assign productURL = "202305/reserve-rewards-plus">
246 <#assign productName = "Reserve Rewards+" >
247 <#break>
248 <#case "121">
249 <#assign productURL = "202208/business-platinum">
250 <#assign productName = "Business Card" >
251 <#break>
252 <#case "128">
253 <#assign productURL = "business-cash-preferred">
254 <#assign productName = "Business Cash Preferred" >
255 <#break>
256 <#case "143">
257 <#assign productURL = "business-real-rewards">
258 <#assign productName = "Business Real Rewards Card" >
259 <#break>
260 <#case "144">
261 <#assign productURL = "smart-business-rewards">
262 <#assign productName = "Smart Business Rewards Card" >
263 <#break>
264 <#default>
265 </#switch>
266 <#if url?matches(".*/${productURL}\\?.*")>
267 <li class="selected" data-value="${productName}" selected="selected"><a href="javascript:void(0)">${productName}</a></li>
268 <#else>
269 <li class="dropdown-item" data-value="${productName}">
270 <a href="${environment}/11t3/${productURL}?ecdma-lc=${lc}${ecidExt}">
271 ${productName}
272 </a>
273 </li>
274 </#if>
275 </#list>
276 </ul>
277 </nav>
278
279 </div>
280 </#if>
281 </header>
282 <script>
283 function toggleFlyOutMenu() {
284 $('.styled-select').toggleClass('show-select');
285 var ariaExpanded = $('.styled-select__dropdown .dropdown-select').attr('aria-expanded');
286 if(ariaExpanded !== null) {
287 var isAriaExpanded;
288 if(ariaExpanded === "true") {
289 isAriaExpanded = true;
290 } else {
291 isAriaExpanded = false
292 }
293 $('.styled-select__dropdown .dropdown-select').attr('aria-expanded', !isAriaExpanded);
294 const ariaLabel = isAriaExpanded? "Open page navigation menu" : "Close page navigation menu";
295 $('.styled-select__dropdown .jn-hamburger').attr('aria-expanded', !isAriaExpanded).attr('aria-label', ariaLabel);
296 }
297 }
298 AUI().ready(function () {
299 var pageSelected = $('.selected').attr('data-value');
300 $('.jn-hamburger, .dropdown-select').click(function () {
301 toggleFlyOutMenu();
302 });
303 $('.styled-select__dropdown').keydown(function(event) {
304 var firstNavigationLink = $('.styled-select__dropdown ul li:visible a').first();
305 var lastNavigationLink = $('.styled-select__dropdown ul li:visible a').last();
306
307 if(event.keyCode === 9 ) {
308 // if they tab outside of the nav close the navigation
309 //shift + tab pressed
310 if(event.shiftKey && firstNavigationLink.is(document.activeElement)) {
311 toggleFlyOutMenu();
312 } else if(!event.shiftKey && lastNavigationLink.is(document.activeElement)) {
313 toggleFlyOutMenu();
314 }
315 }
316 });
317 $('.selected-option').text(pageSelected);
318 });
319 </script>
320 </#if>
321 </div>
322 <script>
323 var reportingData = {};
324
325 //document.addEventListener('DOMContentLoaded', function() {
326 AUI().ready(function () {
327 //console.log('inside ready');
328 var page = location.pathname.split('/')[location.pathname.split('/').length-1];
329 var hostName = location.hostname;
330 function getDomainFromHostname(hostname) {
331 var parts = hostname.split('.');
332 return parts.length === 3 ? parts[1] : parts[0];
333 }
334 var domain = getDomainFromHostname(hostName);
335 var partnerName = "${partnerName!''}";
336 var product = "All Cards";
337 var title = "";
338 var metaDesc = "";
339 var m = document.createElement('meta');
340 switch(page) {
341 case "max-cash-secured":
342 product="Max Cash Secured Card";
343 title = "Earn more on the categories you pick | "+partnerName+" Max Cash Secured Card";
344 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit.";
345 break;
346 case "max-cash":
347 product="Max Cash Preferred Card";
348 title = "Earn a $150 Bonus and 5% cash back | "+partnerName+" Max Cash Preferred Card";
349 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn a $150 Bonus and 5% cash back on the two categories you select.";
350 break;
351 case "consumer-platinum":
352 product="Platinum Card";
353 title = "The purchasing power of Zero | "+partnerName+" Platinum Card";
354 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Limited Time Offer. 0% Intro APR on Purchases and Balance Transfers for 18 Billing Cycles Consolidate your Balances with the "+partnerName+" Intro APR Card.";
355 break;
356 case "consumer-edr":
357 product="Everyday Rewards+";
358 title = "Sign up and earn bonus points | "+partnerName+" Everyday Rewards+";
359 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn 15,000 when you spend $500 within the first 90 days.";
360 break;
361 case "secured":
362 product="Secured Card";
363 title = "Strengthen your finances | "+partnerName+" Secured Card";
364 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit.";
365 break;
366 case "college-real-rewards":
367 product="College Real Rewards";
368 title = "Sign up and earn bonus points. | "+partnerName+" College Real Rewards";
369 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit.";
370 break;
371 case "smart-business-rewards":
372 product="Smart Business Rewards Card";
373 title = "2X rewards in your top 2 spend categories | "+partnerName+" Business Smart Business Rewards Card";
374 metaDesc = "Apply Today for a "+partnerName+" Credit Card. More choices. More value for your business. Earn a $200 Bonus and 2x Rewards on your top 2 spend categories each month with the "+partnerName+" Credit Card.";
375 break;
376 case "business-cash-preferred":
377 product="Business Cash Preferred";
378 title = "Flexible rewards for your business | "+partnerName+" Business Cash Preferred";
379 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn Cash back on common business expenses.";
380 break;
381 case "business-real-rewards":
382 product="Business Real Rewards Card";
383 title = "Earn up to 1.5X points with no caps | "+partnerName+" Business Real Rewards Card";
384 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Get more rewards in the categories you spend the most on." ;
385 break;
386 case "business-platinum":
387 product="Business Card";
388 title = "Pay down your other credit card balances faster | "+partnerName+" Business Card";
389 metaDesc = "Apply Today for a "+partnerName+" Business Card. 0% Intro APR on Purchases and Balance Transfers for 18 Billing Cycles.";
390 break;
391 case "travel-rewards-plus":
392 product="Travel Rewards+"
393 title = partnerName + " | Travel Rewards+ Card";
394 metaDesc = "Make travel more rewarding with unlimited 4x points on travel and frequent popular categories."
395 break;
396 case "reserve-rewards-plus":
397 product="Reserve Rewards+"
398 title = partnerName + " | Reserve Rewards+ Card";
399 metaDesc = "Get exceptional rewards on travel and frequent purchases with this exclusive metal card.";
400 break;
401 default:
402 product = "All Cards";
403 title = partnerName + " Credit Card Index Page";
404 metaDesc = "Apply Today for a "+partnerName+" Credit Card.";
405 }
406 document.title = title;
407 m.name = 'description';
408 m.content = metaDesc;
409 document.head.appendChild(m);
410
411 var lc = "${lc!'0'}";
412
413 /* update SiteCatalyst data object */
414 reportingData.current_page = "microsite:${partnerName}:" + domain + ':' + page.replace('-',' ');
415 reportingData.page_type = 'product';
416 reportingData.site_section = 'credit cards';
417 reportingData.platform = 'microsite';
418 reportingData.campaign_id = '${campaignId}';
419 reportingData.location_code = lc;
420 reportingData.partner_name = partnerName;
421 reportingData.product = product;
422 reportingData.text_to_apply_source = '${text_to_apply_source}';
423 reportingData.visitor_type = 'prospect';
424 reportingData.Banker_id = '0';
425 reportingData.Banker_code = '0';
426
427
428 /* SiteCatalyst pageView tracking */
429 AUI().ready(function() {
430 if (window.publisherFW) {
431 //console.log("pageView");
432 window.publisherFW.publishEvent("pageView", reportingData);
433 }
434 });
435
436 jQuery('.jn-button, .applyNowLink').on('click', function(e){
437 var buttonName = $(this).data('button-name');
438 var productName = $(this).data('product-name');
439 /* SiteCatalyst onClick tracking */
440 reportingData.applyButton = buttonName;
441 reportingData.product = productName;
442
443 if (window.publisherFW) {
444 //console.log('clicked', reportingData);
445 window.publisherFW.publishEvent("onClick", reportingData);
446 }
447
448 });
449
450 jQuery('.applyNowLink').on('click', function(e){
451 ga("send", {
452 hitType: "event",
453 eventAction: "ApplyNow",
454 eventCategory: "click",
455 eventLabel: "BottomButton"
456 });
457 });
458
459 });
460 </script>
461 <#else>
462 <script>
463 console.log("Empty card list");
464 location.href = '${url404}';
465 </script>
466 </#if>
467<#else>
468 <script>
469 console.log("FI Cards Data empty", "pbu:", "${pbu}", ",subbu:","${subbu}");
470 location.href = '${url404}';
471 </script>
472</#if>