Cannot extend unknown button type: "selected"
Cannot extend unknown button type: "selected"

I think I have included all of the appropriate CSS/JS <link> and <script> references required.
This failure prevents the create, edit, remove, and (possibly) select buttons from being added.
Can anyone spot what I am doing wrong?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Maybe start with showing the HTML and JS code you are using so we can see how and what you are loading.
Kevin
I have located the start of the failure:
The line below is causing the ! _dtButtons [ ... ] failure, where it cannot find "selected" in the list.
Again—I have added the following two references:
and
Interestingly enough—when I take it to a live instance, I do not get the failure in the JS, but I also do not get the buttons appearing. Very odd to me.
http://www.moonshotsoftware.com/datatables_ajax
NOTE: I am new to DataTables, so I am just coding up some of the examples and deploying them for learning and practice. The goal is to follow the documentation from start to finish.
Okay—it may have been resolved by me just placing the CSS/JS in the appropriate order. I put a breakpoint at the same throw and found that "selected" was in fact in the _dtButtons array. The reorder of the CSS/JS is the only change I made other than pushing it out to the server.
What remains is that the buttons are still not showing up and the rendering is not correct. If one looks at the http://www.moonshotsoftware.com/datatables page, one can see the proper rendering. What is interesting to me is how both before and after my reordering of CSS/JS, the rendering is not correct, which leads me to think this has something to do with the buttons not showing up, possibly???
I ran the source of the page http://www.moonshotsoftware.com/datatables_ajax through the HTML syntax checker: https://validator.w3.org/
It reported 33 errors and 2 warnings. Might be good to try cleaning up most of the errors which may help to render the page properly. I didn't dig through them to see if they may or may not be affecting you.
Maybe a place to start is a basic editor/datatables page without Bootstrap then build from there.
Kevin
Thank you for the reminder to run the site through the validator.w3.
It turns out that many of the errors were coming from the <!DOCTYPE ...> being set to strict. Specifically:
Interestingly enough, I took the datatables.net and set the doctype to the same "strict" standard. The validator reports 43 errors and 1 warning, yet there is no issue with "Show `n' entries" being displayed. Moreover, with the datatables.net doctype is set to just "html" and then running it through the validator still produces a total of 8 errors and 5 warnings.
Given your prompting about the validator, I worked on that and the current version of my site code produces 0 errors and 0 warning using the same doctype of "html".
So—given all of this I am now on the hunt for what is causing the controls to not show up.
BTW: Your prompting and reminding about the validator did actually help me to expose some latent bugs in my code, so—again—thank you for the reminder!
You are loading
jquery.dataTables.js
twice. Once in line 20 and again in line 22. Not sure if that is causing the Buttons display issue but I suspect it could cause issues in general.Kevin
Excellent point. Thank you!
Nicely done, Kevin! That (in fact) was the issue and probably all along!
The remaining matter is that now, I have nothing on the server side to catch the AJAX requests for New, Edit, and Delete. That'll be the next step in this exercise. Sounds like the complete use-case will be managed (for the example) once I do.
Again—thanks for the EXCELLENT feedback.
BTW: Maybe the datatables folks will want to take a look at some of those errors and warnings. Not that it matters a ton, but in this case it was helpful to me. Perhaps it will be to them as well.
Even so—I have learned that the "strict" setting is something I will want to understand better before applying it willy-nilly to sites I create.
Fair point
That's the HTML5 doctype (they dropped the version and dtd information). I'll look into those errors and warnings though.
Allan