Bug Report: Missing buttons.print.js causes ungraceful failure
Bug Report: Missing buttons.print.js causes ungraceful failure
mr_fnord
Posts: 1Questions: 1Answers: 0
When the js files required for Excel or PDF buttons are missing, those buttons disappear but all other buttons stay and the rest of the dom features appear. When the following script reference is missing but buttons:true or buttons: ['print', 'etc'], all filters, pagination, and buttons, disappear:
<script type="text/javascript" src="https://cdn.datatables.net/buttons/1.2.4/js/buttons.print.js"></script>
To match the behavior of the other buttons, if this script file is missing then everything else should continue to function and the print button should be hidden.
This discussion has been closed.
Answers
It should be throwing an error stating that the print button is not defined. LIkewise if you don't include the HTML5 (or Flash) button types, it should throw an error if you try to use one of those button types.
The idea being that the developer can know that they've made a mistake and need to include the file before deploying it.
Allan