Printing Items out results in console error when Email address is missing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Medium
|
Unassigned | ||
3.1 |
Fix Released
|
Medium
|
Unassigned | ||
3.2 |
Fix Released
|
Medium
|
Unassigned |
Bug Description
3.0.9
Printing the items out receipt and probably other receipts, we are finding that Webby silently fails sometimes. Upon further investigation, there is an error message in the browser console:
grid.js:617 Error executing handler for "Print Item Receipt" => TypeError: Cannot read property 'length' of null
TypeError: Cannot read property 'length' of null
at Object.
at b.$scope.
at fn (eval at compile (angular.js:15126), <anonymous>:4:709)
at b (angular.js:16213)
at e (angular.js:26592)
at b.$eval (angular.js:17994)
at b.$apply (angular.js:18094)
at HTMLAnchorEleme
at HTMLAnchorEleme
at HTMLAnchorEleme
It appears that the lack of the email address tricks the code.
tags: | added: printing webstaffclient |
Changed in evergreen: | |
status: | New → Confirmed |
Changed in evergreen: | |
milestone: | none → 3.3.1 |
Changed in evergreen: | |
milestone: | 3.3.1 → 3.3.2 |
Changed in evergreen: | |
assignee: | nobody → Galen Charlton (gmc) |
importance: | Undecided → Medium |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
This silent fail also happens when an invalid string is in the patron email field. It's 100% reproducible in v.3.0.13 if you just put any non-email value in the email field for any patron account, then attempt to print receipts for checkouts, items out, or bills. Oddly enough, printing the Open Hold Requests list did work.
Here's the Firefox error log for comparison to the Chrome log above:
Error: patronSvc. current. email(. ..).match( ...) is null has_email_ address@https:/ /catalog. branchdistrictl ibrary. org/js/ ui/default/ staff/circ/ patron/ checkout. js:99:39 /catalog. branchdistrictl ibrary. org/js/ ui/default/ staff/build/ js/angular. min.js line 236 > Function:4:302 /catalog. branchdistrictl ibrary. org/js/ ui/default/ staff/build/ js/angular. min.js: 127:472 /catalog. branchdistrictl ibrary. org/js/ ui/default/ staff/build/ js/angular. min.js: 281:165 /catalog. branchdistrictl ibrary. org/js/ ui/default/ staff/build/ js/angular. min.js: 147:65 /catalog. branchdistrictl ibrary. org/js/ ui/default/ staff/build/ js/angular. min.js: 147:297 /catalog. branchdistrictl ibrary. org/js/ ui/default/ staff/build/ js/angular. min.js: 281:215 /catalog. branchdistrictl ibrary. org/js/ ui/default/ common/ build/js/ jquery. min.js: 3:7485 /catalog. branchdistrictl ibrary. org/js/ ui/default/ common/ build/js/ jquery. min.js: 3:5603
$scope.
fn@https:/
b@https:/
e@https:/
$eval@https:/
$apply@https:/
compile/</<@https:/
dispatch@https:/
add/r.handle@https:/
angular.js:14199:17