Latest Nightly breaks bootstrap 4

Latest Nightly breaks bootstrap 4

yakov116yakov116 Posts: 29Questions: 4Answers: 0

https://nightly.datatables.net/js/dataTables.bootstrap4.min.js

dataTables.bootstrap4.min.js:4 Uncaught TypeError: Cannot set properties of undefined (setting 'bootstrap')
at dataTables.bootstrap4.min.js:4:820
at dataTables.bootstrap4.min.js:4:416
at dataTables.bootstrap4.min.js:4:442

    n.ext.renderer.pagingButton.bootstrap = function(e, t, n, o, r) {
        var a = ["dt-paging-button", "page-item"]
          , o = (o && a.push("active"),
        r && a.push("disabled"),
        d("<li>").addClass(a.join(" ")));

Answers

  • allanallan Posts: 61,584Questions: 1Answers: 10,084 Site admin

    Its a cache error - the Bootstrap 4 integration file being loaded was for DataTables 2, while DataTables 1.13.8 core was still being loaded.

    I've cleared the CloudFlare cache for the nightly which should resolve it, although you might still need to do a ctrl-f5 refresh: https://live.datatables.net/rulibaye/1/edit .

    Allan

  • yakov116yakov116 Posts: 29Questions: 4Answers: 0

    Thanks!!

  • zarezare Posts: 1Questions: 0Answers: 0

    Its still happening for me, after hard refresh as well.

    in our <head>:

    <script src="/assets/jquery/jquery.min.js"></script>
    <script src="/assets/bootstrap/dist/js/bootstrap.bundle.js"></script>
    <script type="text/javascript" src="/assets/datatables.net/js/jquery.dataTables.min.js"></script>
    <script type="text/javascript" src="/assets/datatables.net-bs4/js/dataTables.bootstrap4.min.js"></script>
    <script type="text/javascript" src="/assets/datatables.net-buttons/js/dataTables.buttons.js"></script>
    

    loaded via composer:

      "require": {
    "twitter/bootstrap": "4.*",
    "datatables/datatables": "dev-master",
    "datatables.net/datatables.net": "dev-master",
    "datatables.net/datatables.net-dt": "dev-master",
    "datatables.net/datatables.net-bs4": "dev-master",
    "components/jquery": "3.*"
    }
    
  • allanallan Posts: 61,584Questions: 1Answers: 10,084 Site admin

    @zare Can you create a demo repo with a minimal test case showing the issue so I can look into it please?

    Also, remove:

    "datatables.net/datatables.net-dt": "dev-master",
    

    You don't want to mix both DataTables and Bootstrap 4 stylings.

    Allan

Sign In or Register to comment.