Uncaught TypeError: Cannot read property 'mData' of undefined(…)

Uncaught TypeError: Cannot read property 'mData' of undefined(…)

thomas96thomas96 Posts: 4Questions: 1Answers: 0
edited December 2016 in Free community support

I literally have 0 configuration for my table, first time i use this and i get this error:

jquery.dataTables.min.js:90 Uncaught TypeError: Cannot read property 'mData' of undefined(…)

Im using laravel and in the welcome.blade i put this


$(document).ready(function () { $('.dt').DataTable(); });

and add the class to my table

<

table class="dt table table-striped table-responsive">

but immediately it doesnt work

please help

Answers

  • allanallan Posts: 63,836Questions: 1Answers: 10,518 Site admin

    Thanks for your question - however, per the forum rules can you link to a test case showing the issue please. This will allow the issue to be debugged.

    Information on how to create a test page, if you can't provide a link to your own page can be found here.

    Thanks,
    Allan

  • thomas96thomas96 Posts: 4Questions: 1Answers: 0
    edited December 2016

    there seems to be no way for me to set up a demo because I use blade, which means I use 2 seperate php files for one page. I do have a debug file though: http://debug.datatables.net/aqafok

    EDIT: just tried hardcoding the table rows instead of with a blade loop, and it works. So how do i ge to use it with a foreach loop?

  • allanallan Posts: 63,836Questions: 1Answers: 10,518 Site admin

    I'm afraid I don't even know what "blade" is in this context?

    What is the HTML that it generates ("View source")?

    Allan

  • thomas96thomas96 Posts: 4Questions: 1Answers: 0

    blade as in blade.php. It is used in Laravel

  • allanallan Posts: 63,836Questions: 1Answers: 10,518 Site admin

    I didn't know that :smile:.

    Can you answer my second question?

  • thomas96thomas96 Posts: 4Questions: 1Answers: 0

    nvm, I used ui-jp instead of javascript. But now on a different topic, when I try to use the bootstrap css the custom sort arrows overlap with the default ones, I just can't get rid of them

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    What CSS files are you using?

This discussion has been closed.