Uncaught TypeError: $.fn.dataTable.Editor is not a constructor

Uncaught TypeError: $.fn.dataTable.Editor is not a constructor

Dan DeweyDan Dewey Posts: 1Questions: 1Answers: 0

Error messages shown: Uncaught TypeError: $.fn.dataTable.Editor is not a constructor
at selectColumns (table.payment_db.js:4:24)
at Object.complete (table.payment_db.js:124:29)
at c.parseChunk (papaparse.min.js:7:6567)
at c._chunkLoaded (papaparse.min.js:7:8975)
at FileReader.<anonymous> (papaparse.min.js:7:18033)
Description of problem: When I'm trying to upload a csv file I get the error you can see above. Is working properly on my xampp server but when I'm moving everything on the domain server stops working. I have a license on the editor.

This is how I load the scripts:

<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />

    <title>DataTables Editor - payment_db</title>

    <link rel="stylesheet" type="text/css" href="/wp-includes/Editor/Extra/datatables.min.css">
    <link rel="stylesheet" type="text/css" href="/wp-includes/Editor/css/generator-base.css">
    <link rel="stylesheet" type="text/css" href="/wp-includes/Editor/css/editor.dataTables.min.css">
    <link rel="stylesheet" type="text/css" href="/wp-includes/Editor/Extra/Select-1.5.0/css/select.dataTables.min.css">
    <link rel="stylesheet" type="text/css" href="/wp-includes/Editor/Extra/DateTime-1.2.0/css/dataTables.dateTime.min.css">
    <link rel="stylesheet" type="text/css" href="/wp-includes/Editor/Extra/Buttons-2.3.3/css/buttons.dataTables.min.css">

             <script type="text/javascript" charset="utf-8" src="/wp-includes/Editor/js/PapaParse-5.0.2/papaparse.min.js"></script>  
    <script type="text/javascript" charset="utf-8" src="/wp-includes/Editor/Extra/DataTables-1.13.1/js/jquery.dataTables.js"></script>

    <script type="text/javascript" charset="utf-8" src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script>
    <script type="text/javascript" src="https://cdn.datatables.net/v/dt/jqc-1.12.4/dt-1.13.1/b-2.3.2/sl-1.5.0/datatables.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="/wp-includes/Editor/js/dataTables.editor.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="/wp-includes/Editor/Extra/Buttons-2.3.3/js/buttons.html5.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="/wp-includes/Editor/Extra/Buttons-2.3.3/js/buttons.print.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="/wp-includes/Editor/Extra/DateTime-1.2.0/js/dataTables.dateTime.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="/wp-includes/Editor/Extra/Select-1.5.0/js/dataTables.select.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="/wp-includes/Editor/Extra/Buttons-2.3.3/js/dataTables.buttons.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="/wp-includes/Editor/js/table.payment_db.js"></script>

</head>

Answers

  • allanallan Posts: 63,602Questions: 1Answers: 10,486 Site admin

    My guess is that jQuery is also being loaded by another script on your page. Could that be the case? If so, can you stop it from doing that? Or can you load DataTables and Editor after the other jQuery load?

    Basically you want jQuery to load only once on your page.

    Allan

Sign In or Register to comment.