Error messages should link to explanation pages #173

Closed
DataTables opened this Issue Apr 5, 2013 · 1 comment

Comments

Projects
None yet
2 participants
@DataTables
Owner

DataTables commented Apr 5, 2013

The two most common issues in the forums are questions the two DataTables errors for unknown parameters and JSON encoding errors. The error messages do say what the issue is, but in the case of the unknown parameters, not what might be causing the issue, and for JSON not how to resolve it.

I think these error messages (and any others) should provide links to pages on DataTables.net which explain in detail what these errors are and how they can be resolved. Something like: "See http://datatables.net/error/json for more information" in the alert.

@TobiasBg

This comment has been minimized.

Show comment Hide comment
@TobiasBg

TobiasBg Apr 5, 2013

Great idea! The "unknown parameters" warning is really confusing to inexperienced users. Most cases where I encountered it where when there was colspan/rowspan in a table, or incomplete HTML, like a missing quotation mark in a link in a cell:
<td><a href="http://example.com/>text</a></td>

TobiasBg commented Apr 5, 2013

Great idea! The "unknown parameters" warning is really confusing to inexperienced users. Most cases where I encountered it where when there was colspan/rowspan in a table, or incomplete HTML, like a missing quotation mark in a link in a cell:
<td><a href="http://example.com/>text</a></td>

DataTables added a commit that referenced this issue May 26, 2013

Update: Provide link to technical note explaining errors for DT logged
errors

- A lot of posts in the forum are questions such as "what does the
  invalid JSON response" error mean, or "how to fix the unknown
  requested parameter error". To address these, rather than having them
  answered individually in the forum, I'm going to write a series of
  technical notes for DataTables (getting started, how to use columns
  etc) and as part of those, each error that DataTables can fire off
  will have a technical note explaining in deatil what the error means.

- Example:
   DataTables warning: table id=example - Invalid JSON response. For
   more information about this error, please see
   http://datatables.net/tn/1

- This commit puts the required logic in place. The technical notes
  don't exist yet, but they will soon. They will be:

1 - Invalid JSON response
2 - Non-table node initialisation ({this.nodeName})
3 - Cannot reinitialise DataTable
4 - Requested unknown parameter {param} for row {idx}
5 - Unknown paging action: {action}
6 - Possible column misalignment
		- The table cannot fit into the current element which
		  will cause column

- This also has the advantage that the errors in the DataTables code can
  be a little smaller. Around 500 bytes saved.

- This fixes issue #173

@DataTables DataTables closed this May 26, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment