Bug 5449 - JSON malformed in Koha - Blocker with jQuery 1.4.x
Summary: JSON malformed in Koha - Blocker with jQuery 1.4.x
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: rel_3_2
Hardware: All All
: PATCH-Sent (DO NOT USE) blocker (vote)
Assignee: Brice Sanchez
QA Contact: Bugs List
Depends on:
Reported: 2010-11-26 17:14 UTC by Brice Sanchez
Modified: 2019-06-27 09:24 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Text to go in the release notes:
Version(s) released in:

Patch for JSON bug (4.24 KB, patch)
2010-11-26 17:14 UTC, Brice Sanchez
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Brice Sanchez 2010-11-26 17:14:14 UTC
Created attachment 2789 [details] [review]
Patch for JSON bug


After updating jQuery in version 1.4.3, I could not import MARC records with the tools "Stage MARC records for import".

Indeed, JSON was malformed, the JSON script did not respect the standard. So I changed all JSON scripts created on Koha.

Please note, this problem is a blocker with jQuery 1.4.x but not with 1.3.x as the old version was more permissive.

Attached patch.


Après avoir mis à jour jQuery en version 1.4.3, je ne pouvais plus importer de notices MARC avec l'outils "Stage MARC records for import". En effet, les JSON étaient mal formés, ils ne respectaient pas la norme. J'ai donc modifié tous les script créant des JSON sur Koha.

Attention, ce problème est bloquant avec jQuery 1.4.x mais pas 1.3.x car l'ancienne version était plus permissive.

Ci-joint, le correctif
Comment 1 Owen Leonard 2011-01-12 20:36:12 UTC
Can you give more details about problem you encountered? I'm working on a branch which includes an upgraded jquery (1.4.4) and I was able to import MARC records without any problem.

Could it be a problem with jquery 1.4.3?
Comment 2 Owen Leonard 2011-01-12 20:39:32 UTC
I should also note that my branch is based on HEAD, not rel_3_2.
Comment 3 Julian Maurice 2011-03-11 13:42:27 UTC
Tested on branch 3.2.x with jQuery 1.4.3
I successfully reproduce the bug and the patch solve the problem.
Comment 4 Chris Cormack 2011-03-11 19:53:16 UTC
Owen, can you please test this patch and check it works with 1.4.4 too. If so, ill push it as it fixes it for 1.4.3 without breaking 1.4.4.
Comment 5 Owen Leonard 2011-03-17 18:09:02 UTC
> Owen, can you please test this patch and check it works with 1.4.4 too.

Can I get some additional information on how to test this? What is broken when it doesn't work?
Comment 6 Owen Leonard 2011-03-17 18:30:00 UTC
I got no JavaScript errors when I tested with jQuery 1.4.4 originally, and I get no JavaScript errors with 1.5 either.
Comment 7 MJ Ray (software.coop) 2011-04-01 09:43:34 UTC
This bug is mentioned in:
Bug 5449: JSON malformed in	Koha - Blocker with jQuery 1.4.x http://lists.koha-community.org/pipermail/koha-patches/2011-March/014028.html
Comment 8 Jared Camins-Esakov 2011-05-08 20:13:23 UTC
I am resetting the patch status from "Patch pushed" to "Signed off" because the branch new/bug_5449 still needs to be merged into master. I tested and can confirm that it merges cleanly.
Comment 9 Chris Cormack 2011-05-08 20:27:21 UTC
It is in master now, please test