Details
-
Bug
-
Resolution: Tracked Elsewhere
-
Low
-
None
-
4.4, 4.4.3
-
4.04
-
Description
When we create any bug, we got an Javascript error:
JSON.parse: unexpected character
After some investigation, we realised, that problem was in jira-dnd-attachment.js file on line 253:
AJS.$.get(contextPath + "/rest/jira-dnd-attachment/1.0/issue/attachments/limits", function(data) { var limits = JSON.parse(data); // Error is here if (limits !== "undefined" && limits.maxSize !== "undefined") { dndAttachment.attachmentSizeLimit = parseInt(limits.maxSize); } });
When we replaced that string to var limits = data; error gone.
I suppose, that JQuery's get method by default uses Intelligent Guess, and automagically converts data to json. So additional convert is not possible.
Hope, you can fix it quickly.