isTrigger error - seemingly caused when SORTING
isTrigger error - seemingly caused when SORTING
![dylane](https://secure.gravatar.com/avatar/514c0258f65992b717c6215ffb9f5e00/?default=https%3A%2F%2Fvanillicon.com%2F514c0258f65992b717c6215ffb9f5e00_200.png&rating=g&size=120)
Link to test case: Unfortunately I cannot link to a test case, and the issue seems intermittent and the tables are in a secure portion of the site.
Debugger code (debug.datatables.net): The issue doesn't seem to pop a Datatables error. It results in an error sent to Sentry.
Error messages shown:
On Sentry, the error looks like this:
Object captured as exception with keys: isTrigger, jQuery3700892121091154535
Description of problem:
I'm using the DataTables plugin and encountering errors in production. I suspect it's related to sorting, since the requested URL includes these parameters:
• filters[fiscal_year]=2024
• filters[month]=04
• filters[sales_doc_type]=month_summary
• ... (other filter parameters)
• draw=3
• columns[0][data]=placeholder
• columns[0][name]=placeholder
• ... (other column definitions)
• order[0][column]=3
• order[0][dir]=asc
• start=0
• length=50
• search[value]=
• search[regex]=false
• _=1719849866708
While sorting usually doesn't cause errors, it makes testing difficult in this case.
I've encountered two types of errors:
{"isDefaultPrevented":"[Function: returnTrue]","isTrigger":3,"jQuery37008835334434631363":true,"namespace":"dt","result":false,"rnamespace":{},"target":"[HTMLElement: HTMLTableElement]","timeStamp":1719826898448,"type":"error"}
and
{"isTrigger":3,"jQuery37008835334434631363":true,"namespace":"dt","rnamespace":{},"target":"[HTMLElement: HTMLTableElement]","timeStamp":1719826898448,"type":"error"}
There's a similar unresolved issue on the DataTables forum: https://datatables.net/forums/discussion/57125/i-would-like-to-know-the-cause-of-this-error-i-could-not-find-the-solution
Could the issue be related to extremely long ajax requests? We send a lot of data via ajax to be handled by datatables.
Thanks!
Answers
I know you say you can't provide a test case, but unfortunately I don't think I can debug this one without a test case.
isTrigger
is part of a jQuery event object, but I don't know what would be causing the error. Perhaps a long Ajax request, although I would be mildly surprised by that - after a timeout I think it goes into an error handler (perhaps that's where the error is?).At the moment there just isn't enough information to be able to reproduce the error and thus be able to debug it. Sorry - I really would like to help, but I can't without being able to see it.
Allan
Okay thank you. I'll try and find a way to reproduce the error consistently and then go from there.
My idea was an actual content length error from the ajax request - but I guess that would be a consistent issue.
I'll try to followup in the near future.
Thanks again!