There was a problem with a Velocity script
Page/httpd/prestosports/site-public/WEB-INF/themes/generic/camps-registration
ErrorInvocation of method 'addToCartEnabled' in class com.prestosports.render.camp.CampEngine threw exception java.lang.NullPointerException at /httpd/prestosports/site-public/WEB-INF/themes/generic/camps-registration[line 25, column 29]
Page source:
1: ## PICK UP OPTIONS
2: $website.include("options")
3: #set ($options = $request.getAttribute("options"))
4: #if (!$options.get("camper_secure") || $options.get("camper_secure") == true)
5: 	$website.requireSSL()
6: #end
7: $website.addCss("/info/camp-styles.css")
8: $website.addCss("/info/date-picker-styles.css")
9: 
10: #if ($request.getParameter("s") == "1")
11:     $website.requireRole()
12: #end
13: 
14: #set ($invoiceId = $request.getParameter("invoiceId"))
15: 
16: #set ($currentContact = $camps.currentContact)
17: #if ($!currentContact)
18:     #set ($contactCampers = $camps.getContactCampers($currentContact.id))
19: #end
20: 
21: #set ($campId = $request.getParameter("id"))
22: #set ($camp = $camps.getCamp($campId))
23: 
24: #set ($registrationTemplate = "camps-complete-registration")
25: #set ($cartEnabled = $camps.addToCartEnabled()) 
26: #if ($cartEnabled)
27:     #set ($registrationTemplate = "camps-add-registration")
28: #end
29: 
30: <html>
31: <head>
32: <script src="/info/campsUtils.js"></script>
33: <script src="/info/datePickerUtils.js"></script>
34: </head>
35: <body>
36: 
37: #if ($invoiceId.length() > 0)
38:     #set ($invoice = $camps.getCampInvoice($invoiceId))
39:     #if (!$invoice || !$camps.hasAccessToInvoice($invoice))
40:         $response.sendRedirect("/not-authorized");
41:     #end
42: 
43:     #set ($answersMap = $invoice.getAnswersMap())
44:     #set ($camp = $camps.getCamp($invoice.campId))
45:     <h1 class="camp-title">$camp.title</h1>
46:     <span class="camp-subtitle">$!camp.description</span>
47:     <br>
48:     #if ($camp.multipleSessions)
49:         <h2>Session(s) attending:</h2>
50:         #foreach ($theReg in $invoice.registrations)
51:             $theReg.campSession.name #if($theReg.cancelled) (cancelled) #end<br>
52:         #end
53:         <br>
54:     #end
55:     <h2 class="camp-camper-info">$camp.camperTitle:</h2>
56:     #if (!$camp.hasField('camper_name'))
57:         <strong>Name *</strong><br>
58:         ${invoice.camperName}<br>
59:     #end
60:     #foreach ($question in $camp.camperQuestions)
61:         #if ($question.id == 'camper_name')
62:             <strong>Name *</strong><br>
63:             ${invoice.camperName}<br>
64:         #else
65:             #set ($required = "")
66:             #if ($question.required)
67:                 #set ($required = "*")
68:             #end
69:             <strong>$question.name $required</strong><br>
70:             #set ($answer = "")
71:             #set ($answer = $!answersMap.get($question.id))
72:             #set($splittedAnswer = $answer.split("\t"))
73:             #foreach($a in $splittedAnswer)
74:                 $!a<br>     
75:             #end
76:         #end
77:     #end    
78:     <br>
79:     <h2 class="camp-parent-info">$camp.parentTitle:</h2>
80:     #if (!$camp.hasField('email_address'))
81:         <strong>Email Address *</strong><br>
82:         $invoice.parentEmail<br>
83:     #end
84:     #foreach ($question in $camp.parentQuestions)
85:         #if ($question.id == 'email_address')
86:             <strong>Email Address *</strong><br>
87:             $invoice.parentEmail<br>
88:         #elseif ($question.id == 'first_name')
89:             <strong>Parent/Guardian first name #if($question.required) * #end</strong><br>
90:             $!answersMap.get($question.id)<br>
91:         #elseif ($question.id == 'last_name')
92:             <strong>Parent/Guardian last name #if($question.required) * #end</strong><br>
93:             $!answersMap.get($question.id)<br>
94:         #else
95:             #set ($required = "")
96:             #if ($question.required)
97:                 #set ($required = "*")
98:             #end
99:             <strong>$question.name $required</strong><br>
100:             #set ($answer = "")
101:             #set ($answer = $!answersMap.get($question.id))
102:             #if ("cell_phone_carrier" == $question.id)
103:                 #foreach ($cellCarrier in $contacts.getCellCarriers())
104:                     #if ($cellCarrier.enumCode == $answer)
105:                         $cellCarrier<br>
106:                     #end
107:                 #end  
108:             #else
109:                 #set($splittedAnswer = $answer.split("\t"))
110:                 #foreach($a in $splittedAnswer)
111:                     $!a<br>     
112:                 #end
113:             #end
114:         #end
115:     #end
116: 
117:     #if($camp.waiver)
118:         <br>
119:         <h2 class="camp-waiver-title">Waiver:</h2>
120:         <span class="camp-waiver-text">
121:             ${camp.waiverText}<br>
122:             I understand by printing my name below I am submitting my online signature.<br><br>
123: 	        <strong>Signature *</strong><br>
124: 	        $!answersMap.get('online_signature')<br>
125:         </span>        
126:     #end
127:     #if (!$camp.emergencyQuestions.isEmpty())
128:         <br>
129:         #if (!$camp.emergencyTitle )
130:             #set ($emergencyTitle = "Emergency Contact Information")
131:         #else 
132:             #set ($emergencyTitle = $camp.emergencyTitle)
133:         #end 
134:         <h2>$emergencyTitle:</h2>
135:         #foreach ($question in $camp.emergencyQuestions)
136:             #set ($required = "")
137:             #if ($question.required)
138:                 #set ($required = "*")
139:             #end
140:             <strong>$question.name $required</strong><br>
141:             #set ($answer = "")
142: 	        #set ($answer = $!answersMap.get($question.id))
143:             #set($splittedAnswer = $answer.split("\t"))
144: 	        #foreach($a in $splittedAnswer)
145: 	            $!a<br>     
146: 	        #end
147:         #end    
148:     #end
149:     <br>
150:     #foreach ($question in $camp.fixedQuestions)
151:         #if (!$question.id.equals("understand_charge"))
152:             #if ($!answersMap.get($question.id))
153:                 #set ($required = "")
154:                 #if ($question.required)
155:                     #set ($required = "*")
156:                 #end
157:                 <strong>$question.name $required</strong><br>
158:                 #set($answer = $!answersMap.get($question.id))
159:                 #set($splittedAnswer = $answer.split("\t"))
160:                 #foreach($a in $splittedAnswer)
161:                     $!a<br>
162:                 #end
163:             #end
164:         #end
165:     #end
166:     
167: #elseif ($camp)
168: 
169: 	<h1 class="camp-title">$camp.title</h1>
170: 	
171: 	#if (!$currentContact)
172: 		<span class="camp-subtitle">$!camp.description</span>
173: 	#end
174: 
175: 	<div id="error"></div>
176: 	
177: 	#if ($camp.full)
178:         <br>
179:         <h2>This camp is full and does not allow any more registrations</h2>
180:     #elseif (not $camp.active) 
181:         <br>
182:         <h2>This camp is not open for registration (either is pending or already took place)</h2>
183:     #else
184: 
185:         #if (!$currentContact)
186:             #if ($website.hasRole())
187:                 Admins must complete all tasks in the admin system, not through this fan facing side. Please login and click into the Camps tab.
188:             #else
189:                 <h1>Sign in or create an account to complete registration:</h1>
190:                 <button class="camp-signin-button" onclick="javascript:location.href='/camps/camps-registration?id=$campId&s=1';return false;">Sign in</button>
191:                 <button class="camp-signin-button" onclick="javascript:location.href='/camps/camps-create-contact?campId=$campId';return false;">Create account</button>
192:             #end
193:         #else
194:         	#set ($campersAvailable = $camps.getCampersWithAvailableRegistrations($camp.id, $currentContact.id))
195:         	#set ($campersRegistered = $camps.getCampersRegisteredToAllSessions($camp.id, $currentContact.id))
196:         	#if ($campersAvailable.isEmpty() && $campersRegistered.isEmpty())
197: 				#$response.sendRedirect("$registrationTemplate?id=$campId")
198: 				#stop
199:         	#end
200:         	
201:         	Hi $currentContact.name,<br>
202:         	What would you like to do?
203:             <ul>
204: 	            #foreach ($camper in $campersAvailable)
205: 					<li>
206: 						<a href="$registrationTemplate?id=$campId&camper=$camper.id&invoice=$camper.invoiceNumber">Add more sessions to <b>$camper.name's</b> registration</a>
207: 					</li>
208: 	            #end
209:             	#foreach ($camper in $campersRegistered)
210: 					<li>
211: 						<a href="camps-registration?invoiceId=$camper.invoiceNumber">View <b>$camper.name's</b> registration</a>
212: 					</li>
213:             	#end
214: 	        	<li>
215: 	            	<a href="$registrationTemplate?id=$campId&onlyUnregisteredCampers=true&s=1">Register another camper</a>
216: 	            </li>
217: 	        	<li>
218: 	            	<a href="camps-contact#add-camper">Add a new camper to My Account</a>
219: 	        	</li>
220: 	        	<li>
221: 	            	<a href="camps-contact">Pay remaining amount</a>
222: 	            </li>
223: 	            <!--
224: 	        	<li>
225: 	            	<a href="camps-contact#add-camper">View and download your invoice</a>
226: 	        	</li>
227: 	        	-->
228: 	        </ul>
229:         #end
230:     #end ##camp.isFull
231: #else
232: 	$response.sendRedirect("/camps/camps-list")
233: #end
234: $wiki.su
235: 
236: </body>
237: </html>