There was a problem with a Velocity script
Page/schedule-boxscore-template
ErrorInvocation of method 'getEvents' in class com.prestosports.content.sport.Schedule threw exception java.lang.IllegalArgumentException: The date must not be null at cfzhn97itr6bzn3b/schedule-boxscore-template[line 14, column 27]
Page source:
1: #if($website.redesign)
2: 
3: ## NEW SITE
4: 
5: #set ($eventLimit = 500)
6: #if ($tool.math.toInteger($request.getParameter("eventLimit")) > 0)
7:   #set ($eventLimit = $tool.math.toInteger($request.getParameter("eventLimit")))
8: #end
9: 
10: #set ($confmemberIDs = $page.teamIDs)
11: #set ($counter = 0)
12: #set ($columns = 1)
13: #set ($showTeamLogo = false)
14: #set ($events = $schedule.getEvents())
15: #set ($onlyToday = false)
16: #set ($showLinkIcon = false)
17: 
18: #if ($tool.math.toInteger($request.getParameter("columns")))
19:   #set ($columns = $tool.math.toInteger($request.getParameter("columns")))
20: #end
21: 
22: #if ($request.getParameter("onlyToday"))
23:   #set ($onlyToday = $request.getParameter("onlyToday"))
24: #end
25: 
26: #if ($request.getParameter("showTeamLogo") == true)
27:   #set ($showTeamLogo = true)
28: #end
29: 
30: #if ($request.getParameter("showLinkIcon") == true)
31: 	#set ($showLinkIcon = true)
32: #end
33: 
34: #if ($onlyToday)
35: 
36:   #set ($today = $formatter.formatDate($now, "yyyy-MM-dd")) ## remove the time part
37:   #set ($today = $tool.date.toDate("yyyy-MM-dd", $today)) ## convert back to date
38:   #set ($events = $schedule.getEventsBetweenDates($today, $today))
39: 
40:   #if ($events.size() > 0)<h2>Today</h2>#end
41: 
42: #end
43: 
44: #if ($events.size() > 0)
45: <div class="schedule-boxscore">
46: 
47: #foreach ($event in $events)
48: #if ($velocityCount <= $eventLimit)
49: 
50: #set ($counter = $counter + 1)
51: 
52: #if ($counter == 1 && $columns > 1)
53: <div class="row clearfix">
54: #end
55: 
56: <div class="event-box clearfix">
57: 
58: <div class="date clearfix">
59: <span class="month">$formatter.formatDate($event.date, "MMM")</span>
60: <span class="day">$formatter.formatDate($event.date, "dd")</span>
61: <span class="year">$formatter.formatDate($event.date, "yyyy")</span>
62: </div>
63: 
64: <div class="event-info clearfix">
65: 
66: <div class="sport-status clearfix">
67:   <span class="status">$formatter.formatStatus($event)</span>
68: #if ($event.sport)
69:   <span class="sport">$event.sport</span>
70: #end
71: </div>
72: 
73: <div class="teams">
74:     
75: #foreach ($team in $event.teams)
76: 
77:   <div class="team clearfix">
78: 
79:   #if ($team.result.length() > 0)
80:     <span class="result">$team.result</span>
81:   #end
82: 
83:   #if ($showTeamLogo)	
84:     #if ($team.teamId)
85:       <div class="team-logo">
86:         <img src="${website.teamLogo($team.teamId)}" alt="${team.name}" title="${team.name}" onerror="$(this).parent().addClass('no-logo')" />
87:       </div>
88:     #else
89:       <div class="team-logo no-logo">
90:       </div>
91:     #end
92:   #end 
93: 
94:   #if ($velocityCount == 2)
95:     #if ($event.neutralSite.length() > 0)
96:         <span class="va">vs.</span>
97:     #else
98:       #if (!$event.home)<span class="va">at</span>#else <span class="va">vs.</span>#end
99:     #end
100:   #end
101: 
102:   #if ($confmemberIDs.contains($team.teamId))
103:     <a href="${page.url}?teamId=${team.teamId}" class="team-name">$team.name</a>
104:   #else
105:    <span class="team-name">$team.name</span>
106:   #end
107: 
108: 
109:   </div> ## team
110: 
111: #end ## teams loop
112: 
113: </div> ## teams
114: 
115: #if ($event.neutralSite.length() > 0)
116:   <div class="neutral-site">@ $event.neutralSite</div>
117: #end
118: 
119: <div class="links">
120: #if ($event.links.size() > 0)
121:   #set ($linksCounter = 0)
122:   #foreach ($link in $event.links)
123:     #if ($restrictLinks && $event.statusCode >= 0 && (
124:       $link.name.equalsIgnoreCase("live stats") || 
125:       $link.name.equalsIgnoreCase("preview") || 
126:       $link.name.equalsIgnoreCase("directions") || 
127:       $link.name.equalsIgnoreCase("tickets") || 
128:       $link.name.equalsIgnoreCase("audio")))
129:     #else			
130:       #set ($linksCounter = $linksCounter + 1)
131:       #if ($linksCounter > 1)<span>|</span>#end
132:       <a href="$link.url" #if ($website.isExternalLink($link.url)) target="_blank" #end>
133:       #if ($showLinkIcon)
134:         <i class="gicon-${link.name.toLowerCase().replace(" ", "")}" title="$link.name"></i>
135:       #end
136:         <span>$link.name</span>
137:       </a>
138:     #end
139:   #end
140: #end
141: </div>
142: 
143: </div> ## event info  
144: </div> ## boxevent
145: 
146: #if (($counter == $columns || $velocityCount == $events.size()) && $columns > 1)
147: #set ($counter = 0)
148: </div> ## row
149: #end
150: 
151: 
152: #end ## eventLimit
153: #end ## loop
154: 
155: $wiki
156: </div> ## schedule-boxscore
157: 
158: #else ## no events available
159: 
160: #if (!$onlyToday && $website.isIncluded())
161:   <div class="schedule-boxscore"><div class="no-events">No events to show</div></div>
162: #end
163: 
164: #end
165: 
166: #else
167: 
168: ## OLD SITE
169: 
170: <div class="upcoming">
171: <img src="/images/setup/calendar.jpg" />
172: <div style="height: 185px; padding: 10px; overflow: auto;">
173: #foreach ($event in $schedule.getEvents())
174: 
175: 
176: ## SCHEDULE LINKING
177: #set ($scheduleURL = $event.feedURL)
178: #set ($start = $scheduleURL.indexOf("tmpl="))
179: #set ($end = $scheduleURL.indexOf("&", $start) + 1)
180: #if ($end == 0)
181: #set ($start = $start - 1)
182: #set ($scheduleURL = "$scheduleURL.substring(0, $start)")
183: #else
184: #set ($scheduleURL = "$scheduleURL.substring(0, $start)$scheduleURL.substring($end)")
185: #end
186: 
187: <div class="boxscore">
188:   <div class="boxscore-score">$formatter.formatStatus($event)</div>
189: $formatter.formatDate($event.date, "EEE., MMM, dd")
190: <br>
191: 
192: <b><a href="$scheduleURL">$event.sport</a></b>
193:   #if (!$event.home)
194:    at $event.opponent.name<br>
195:   #else
196:     vs. $event.opponent.name<br>
197:   #end
198: 
199: 
200: 
201:   #if ($event.neutralSite.length() > 0)
202:     @ $event.neutralSite <br>
203:   #end
204:   #if ($event.notes.length() > 0)
205:     $event.notes <br>
206:   #end
207:  #foreach ($link in $event.links)
208:   #if ($velocityCount > 1)|#end
209:   <a href="$link.url">$link.name</a>
210:  #end
211: </div> ## boxscore
212: <br>
213: #end
214: </div> ## overflow
215:  <div align="center"><a href="/composite"><img src="/images/setup/calendarButton.gif"></a></div></div>
216: $wiki
217: 
218: #end