JavaScript error opening patron search form

Bug #1359934 reported by Galen Charlton on 2014-08-21
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Evergreen
High
Unassigned
2.5
Medium
Unassigned
2.6
Medium
Unassigned

Bug Description

Opening the patron search form in the staff client results in the following error being displayed:

  "\npatron/search_form.xul\nSyntaxError: JSON.parse: unexpected character\n and such"

This stems from the patch for OpenSRF bug 1316245, which replaces the JSON parsing routines with the native JSON.parse() However, JSON.parse() is stricter, and throws an exception if it's given an undefined value as its argument.

Evergreen master
OpenSRF

Galen Charlton (gmc) wrote :

A patch is available at the tip of the collab/gmcharlt/lp1359934_accommodate_stricter_json2js branch in the working/Evergreen repository:

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/collab/gmcharlt/lp1359934_accommodate_stricter_json2js

Changed in evergreen:
milestone: none → 2.7.0-beta2
importance: Undecided → High
tags: added: pullrequest
Galen Charlton (gmc) wrote :

Note that the patch is assuming that we are choosing to run with JSON2js's new-found strictness. An alternative would be to change JSON2js in OpenSRF to restore the previous behavior when passed an undefined value.

Ben Shum (bshum) wrote :

Patch works to resolve the error I found with patron search in XUL client.

Signed off and pushed to master.

Changed in evergreen:
status: New → Fix Committed
Galen Charlton (gmc) wrote :

Backported to rel_2_6 and rel_2_5.

Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers