Buttons plugin breaks > 1.6.0

Buttons plugin breaks > 1.6.0

itajackassitajackass Posts: 165Questions: 49Answers: 3
edited July 2020 in Free community support

I can't update Buttons plugin cause it break all buttons. All list ( COLUMN VIS, EXPORT, SHOW ALL, ....) become empty. See pic:

My last working version is 1.6.0. If I try to update >= 1.6.1 I get trouble.
I don't know how to debug it...I don't see any error in firebug.

It seem a CSS problem cause firebug show me content:

I've already tried to temporary disable all other scripts except jquery.js and bootstrap.js...no success.

Any suggest?

Replies

  • itajackassitajackass Posts: 165Questions: 49Answers: 3
    edited July 2020

    UPDATE: if i temporary exclude "bootstrap.min.css" (version 3.4.1) all buttons work great...

    Then I reenabled it and I see in firebug (inside dropdown.less:31):

    .dropdown-menu {
       [x] position: absolute;
       ..
       ..
    

    If I uncheck "POSITION:ABSOLUTE" the list reappear... a little bit ugly but it appears again.

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • itajackassitajackass Posts: 165Questions: 49Answers: 3

    Hi @colin , I can't replicate the problem using http://live.datatables.net (i don't know why) but I found the problem where to start to investigate...

    If you try it, all works great: http://live.datatables.net/zohepuwi/1/edit

    See pic:

    But if you edit manually with firebug and you add:

    class="dropdown-menu"
    

    Then menu disappear. See pic:

    I don't know why using http://live.datatables.net the class is not added automatically.... in my environment class="dropdown-menu" is already present...

    If I edit buttons.bootstrap4.min.js here:

    collection:{tag:"div",className:"dropdown-menu"   ...
    

    and I change to:

    collection:{tag:"div",className:""   ...
    

    My system works. But http://live.datatables.net i don't know why doesn't add the class automatically.

    I'm using the same jquery, datatables, bootstrap versions like demo provided :(

    The problem appear on button plugin version >= 1.6.1
    No problem with 1.6.0 version.

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    It would be worth trying the Buttons nightly release, as there was a fix that sounds a bit similar. Can you verify that, please. You can find the nightly releases here.

    Colin

  • itajackassitajackass Posts: 165Questions: 49Answers: 3

    Hi @colin tried without success. The problem is inside "buttons.bootstrap4.min.js" file. There is no nightly version for this

  • colincolin Posts: 15,240Questions: 1Answers: 2,599
  • itajackassitajackass Posts: 165Questions: 49Answers: 3

    Hi, no success :(

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    As you can't replicate it on live, it suggests something on your site, so we'll really need to see it.

    Colin

  • itajackassitajackass Posts: 165Questions: 49Answers: 3
    edited July 2020

    of course, here: http://bluetimes.info/test_datatable/index/

    here I use buttons 1.6.2.
    if you switch to 1.6.0 using firebug, all work ok.

  • allanallan Posts: 63,489Questions: 1Answers: 10,468 Site admin

    You are loading a real mix of stylesheets there which I think is causing at least part of the problem. Could you use the download builder to make sure you get only the files you need please?

    For example:

        <link href="http://www.bluetimes.info/test_datatable/assets/advanced-datatable/Buttons/css/buttons.dataTables.min.css?v=1.6.1" rel="stylesheet" />
        <link href="http://www.bluetimes.info/test_datatable/assets/advanced-datatable/Buttons/css/buttons.bootstrap.min.css?v=1.6.1" rel="stylesheet" />
    

    shouldn't be loaded together. Only one of them.

    Allan

This discussion has been closed.