JavaScript error opening patron search form

Bug #1359934 reported by Galen Charlton
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
High
Unassigned
2.5
Fix Released
Medium
Unassigned
2.6
Fix Released
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

Tags: pullrequest
Revision history for this message
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
Revision history for this message
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.

Revision history for this message
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
Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.