[Seaside] How can I debug ajax errors?

Mariano Martinez Peck marianopeck at gmail.com
Fri Feb 10 20:02:09 UTC 2017


Hi guys,

It happens to me quite frequently that I have some issue in an AJAX calls.
On Chrome, I see:

Uncaught SyntaxError: Unexpected token $ in JSON at position 0
    at JSON.parse (<anonymous>)
    at Function.n.parseJSON (jQuery.js:4)
    at HTMLDocument.<anonymous>
(reps?_s=YZ0L_G1AYPiERSfd&_k=lD9O_xh3oh59qMMq:453)
    at HTMLDocument.dispatch (jQuery.js:3)
    at HTMLDocument.r.handle (jQuery.js:3)
    at Object.trigger (jQuery.js:3)
    at x (jQuery.js:4)
    at XMLHttpRequest.b (jQuery.js:4)

But there is no way for me to know what triggered that at Seaside level. If
I inspect the "VM2043:1" kind of link in the Chrome console, I get to the
script generated by my ajax which is something like:

$("#id174").replaceWith("<div class=\"companyReportMainDiv\"
id=\"id232\"><div id=\"popupContainer9358488\"
class=\"popupContainer\"></div><script
..........
)

Chrome shows me that with a red underline like if that would have an error,
but such JS is correct.

Any idea how can I know what is going on?


-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/seaside/attachments/20170210/eae917e0/attachment.html>


More information about the seaside mailing list