Datatables Wordpress Media Library Conflict
Datatables Wordpress Media Library Conflict
I am running in a very odd and strange conflict that had be scratching a dent in my head. I have been using DataTables in wodpress plugins for sometime now and have never had any issues. I then tried to use the wordpress media library and data tables on the same page. Here is the interesting part... if I have all the script on the page but don't ever call .DataTable() there is not problem. The second I actually call .DataTable() it breaks the pop up media library and I see a "TypeError: undefined is not an object (evaluating 'n.replace')" coming from underscore.js. Anyone have an advice on this one?
Replies
Not a clue I'm afraid. We'd really need a link to a page showing the issue.
My guess is that jQuery is being loaded multiple times perhaps?
Allan
Sorry for being so vague it was just hard to reproduce. Turns out the table for the DataTable was missing the closing </tbody> and </table> tags! For some reason that was causing it to break the media library for some odd reason.
Weird. But good to hear you've got it working now
Allan