DataTables warning: TABLE id=DataTables_Table_0 - Requested UNKNOWN parameter '7' FOR ROW 0
2017-08-31 10:06
1501 查看
使用H-ui.admin或者DataTables的人都难免会碰到:
DataTables warning: TABLE id=DataTables_Table_0 - Requested UNKNOWN parameter '7' FOR ROW 0. FOR more information about this error, please see http://datatables.net/tn/4[/code] href="https://s1.51cto.com/wyfs02/M01/A4/3F/wKioL1mnbTrxzvA6AADGCI16WpI477.jpg" target=_blank>此错误,结果去了DataTables官网手册也没看懂怎么解决. 耐着着急的赶项目的心,仔细去对比从复制过来的功能模块去核对两者的不同之处: 是因为:列表页面参加排序的字段数量问题(thead里面只有6个字段,而参与排序设置的是7个字段)
Datatables设置排序字段值:
《这段代码在H-ui.admin的每个列表页面都会有的》
把"aTargets":[0,7]改成thead里面的数量即可$('.table-sort').dataTable({ "aaSorting": [[ 1, "desc" ]],//默认第几个排序 "bStateSave": true,//状态保存 "aoColumnDefs": [ {"orderable":false,"aTargets":[0,6]}// 制定列不参与排序 ] });
这个解决方法只针对此错误。
同类问题参考文章:
http://www.cnblogs.com/caicaizi/p/6534325.html
http://blog.csdn.net/ouyangyiqin/article/details/27224999 https://github.com/rembo10/headphones/issues/856(这篇文章的错误是清除缓存就正常了)
相关文章推荐
- DataTables warning: table id=DataTables_Table_0 - Requested unknown parameter '1' for row 0. For more information about this error, please see http://datatables.net/tn/4
- DataTables warning: table id=dataTable - Requested unknown parameter 'acceptId' for row 0. For more
- DataTables warning: table id=dataTable - Requested unknown parameter 'acceptId' for row 0. For more
- DataTables warning: table id=data-table - Requested unknown parameter '3' for row 0.
- jquery.datatables出现DataTables warning: table id=tabList - Cannot reinitialise DataTable. For more in
- DataTable Warning:Table id=...for row 0
- Troubleshooting: "WAITED TOO LONG FOR A ROW CACHE ENQUEUE LOCK! " (文档 ID 278316.1)
- Index hint ignored for driving table of Outer Join[ID 316518.1]
- [dataTables使用的坑]requested unknown parameter 'XXX' for row xx, column xx
- 解决Incorrect integer value: '' for column 'id' at row 1的方法
- [dataTables.js error] Uncaught TypeError: myTable.row is not a function
- Data too long for column 'corp_id' at row 1
- java.sql.SQLException: Incorrect integer value: '' for column 'id' at row 1
- Data truncation: Data too long for column 'id' at row 1
- How Can I Get the Unique ID for the Last Inserted Row
- ERROR 1118 : Row size too large. The maximum row size for the used table type
- MySQL出现The maximum row size for the used table type, not counting BLOBs, is 8126.错误
- Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You
- 解决Incorrect integer value: '' for column 'id' at row 1
- ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not counting B