DataTables warning: table id=table_id - Cannot reinitialise DataTable.

DataTables warning: table id=table_id - Cannot reinitialise DataTable.

tariqetariqe Posts: 3Questions: 1Answers: 0
edited February 2021 in Free community support

Hi,

I'm working on Flask with Mysql using SQLAlchemy .. It's working fine with datatable .. but my problem that when start server or add new entry i get message error bellow
**DataTables warning: table id=table_id - Cannot reinitialise DataTable**.

<script>
        $(document).ready(function () {
            $('#table_id').DataTable(
                {
               sPaginationType: "full_numbers",
               lengthMenu: [[10, 25, 50, 100], [10, 25, 50, 100]],
               columns: [
                    { "data": "id" },
                    { "data": "statename" },
                    { "data": "itpcbb" },
                    { "data": "vlanid" },
                    { "data": "firstip" },
                    { "data": "secondip" },
                    { "data": "scisswip" },
                    { "data": "notes" },
                    { "data": "actions" },
                    ]
                }
            );
        });

Kindly is there any advice about this issue ... Thanks in advance

Answers

  • allanallan Posts: 61,696Questions: 1Answers: 10,102 Site admin

    That error suggests you are initialising DataTables twice or more. That doesn’t appear to be the case from your code above, so there is something else going on. Can you give me a link to you page so I can help debug it please.

    Regards,
    Allan

  • tariqetariqe Posts: 3Questions: 1Answers: 0
    edited February 2021

    Kindly, is there any update .. i already comment with url but it not appear

  • tangerinetangerine Posts: 3,348Questions: 36Answers: 394

    Please post your url again.

  • tariqetariqe Posts: 3Questions: 1Answers: 0

    Solved .. i just used ( retrieve: true,) can explain to me the main function for this

  • colincolin Posts: 15,143Questions: 1Answers: 2,586

    There's a good description on the reference page for retrieve,

    Colin

This discussion has been closed.