I recently upgraded to 1.5, and functions like:
function showData(id) {
$.get("/url/getdata", {id : id}, function(data) {
$("#dialogData").html(data);
$("#dialogData").dialog({width: 500, modal: true, zIndex:22000});
}, "json");
}
no longer work with the addition of 1.5.
Looking at firebug, the correct data is returned, but the function breaks after entering the callback. Everything simply stops.
How can I fix this? I read about the changes to Ajax call in 1.5, but I have over a thousand such calls through my project -> I cannot even begin to think about hunting them all down and changing them, let alone bug testing it all.
Edit: Oddly enough, if I put "text json" instead of "json" for dataType, it works. I don't think going through all my code and changing that is a viable option...
Edit 2: Instead of returning json_encode($string), I tried returning json_encode(array("string" => $string)), and then I did $(element).html(data.string). This did not work either, and the JSON data I got with this call was valid on jsonlint.com
Edit 3: Tried setting headers prior to the json_encode output, didn't work. So far the only solution has been setting the datatype to text json.
I got the culprit. It was queue.js, an ajax extension that allowed queueing and abortion of ajax calls. It extended jquery's ajax, so ajax ended up being broken in this minute way. Now to find a way to restore compatibility and I'm all good.
Thanks for the effort all!