Depending on the shown error messages, we can then narrow down the cause. Here’s a list of common possible error messages and their causes:
Uncaught TypeError: Cannot read property 'mData' of undefined
If you are not using the
#rowspan# keywords in the affected table, chances are high that the HTML code in your table is broken somewhere. A visual indicator for this can be that content or cells in the table are shifted, e.g. they are shown on the left of the other cells in the same column. Very often, this happens when using HTML code for a link in the table. It is very important that e.g. quotation marks
" are used properly around the values of HTML tag attributes, e.g. around the URL after the
href= attribute. Please check that this is the case for all HTML tags in your table.
Uncaught ReferenceError: jQuery is not defined
jquery. If there’s more than one result within HTML
<script> tags, this means that the library is loaded multiple times. If that is the case, the loading of the old versions should be stopped, so that only the version that comes with WordPress is loaded. This usually means deleting a line similar to
<script src="/js/jquery.js">Code language: HTML, XML (xml)
from the theme’s “header.php” file. Other variants are lines like
wp_deregister_script( 'jquery' ); wp_register_script( 'jquery', ... );Code language: PHP (php)
in the “functions.php” file.
No or other error messages