Bugfix Issue 823 SearchView DataTable Fallback - sebiboga/testlink-upgraded GitHub Wiki
gui/templates/search/searchView.html had the same defect as #799 (fixed
only in searchQuickView.html): renderResults() called
$('#resTable').DataTable({...}) unguarded. When the DataTables CDN was slow
or unavailable, this threw TypeError: $(...).DataTable is not a function,
leaving the results wrapper visible with a non-zero match count but an
empty table body and the Find button disabled.
Ported the #799 pattern into searchView.html renderResults():
- Render plain
<tbody>rows first (rows always display). - Enhance with DataTables only when
typeof $.fn.DataTable === 'function', wrapped in try/catch.
Commit: 39d9c5b11. Refs #799.
- With DataTables CDN disabled: rows render, no TypeError, Find re-enabled.
- Normal path: 85 rows, sort/search/paginate intact.