Problems after Update to 2.0

Problems after Update to 2.0

RappiRappi Posts: 82Questions: 18Answers: 1

Hello,
after the update to the 2.0 I have massive problems with datatables and editor.
I use datatables in a closed system, so I have created a test file.

At https://tiermanagement.rappi.de/table_old.php you can see the tables with the old version 1.9.

All is working fine.

At https://tiermanagement.rappi.de/table_old_w_update.php only the new version, build with download builder, was included and otherwise no changes were made.

The layout is destroyed, the upper table is no longer displayed and with Datatables Debug (https://debug.datatables.net/utifis) also no longer recognized and in the lower tables one is in a continuous loop when saving.

Difference in the two tables:
In the first one the script is directly embedded in the page and in the second one it is loaded with <script src......>.
So far it was working with serverSide: false.

I have then added to serverSide:true and ajax to type:POST.

The result can be found at https://tiermanagement.rappi.de/table_new.php

The second table now works fine but the upper one is still not recognized. Also the layout is still incorrect.

An adjustment in the whole code will take days.

What can I do?

Rappi

This question has accepted answers - jump to:

Answers

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

    Your link https://tiermanagement.rappi.de/table_old_w_update.php has this error:
    Uncaught Error: Error adding field - unknown field type date

    You need to include the new DateTime library. See here:
    https://tiermanagement.rappi.de/table_old_w_update.php

  • RappiRappi Posts: 82Questions: 18Answers: 1
    edited April 2021

    Thanks for your answer.

    I created everything with the Download builder and of course included DateTime.

    So that can't be the problem.

    Or is the version in the download builder not up to date?

    Edit:
    I have now included DateTime again separately. No change. So it is definitely not because of that.

  • kthorngrenkthorngren Posts: 21,330Questions: 26Answers: 4,951
    Answer ✓

    Checkout this section of the Editor 2.0 blog. It states:

    but for completeness, the following options have been removed:

    date field type. This depended upon either the jQuery UI library, or the HTML5 date input type which is poorly supported in browsers and offers little flexibility. The built-in datetime input type should be used instead, which has been available since Editor 1.5.

    Sounds like you need to change your field type date to datetime as support for date has been removed.

    Kevin

  • RappiRappi Posts: 82Questions: 18Answers: 1

    That was it!

    However, the layout problem still remains. Does anyone have an idea? Actually nothing was changed in Bootstrap. It is still the same version.

  • kthorngrenkthorngren Posts: 21,330Questions: 26Answers: 4,951

    Looks like you have conflicting/duplicate CSS. The https://tiermanagement.rappi.de/table_old_w_update.php page is loading bootstrap.css (3.3.5) and datatables.css (includes Bootstrap 3 3.3.7). The properly styled https://tiermanagement.rappi.de/table_old.php page isn't loading bootstrap.css. Remove bootstrap.css from the page with the styling issues.

    Kevin

  • RappiRappi Posts: 82Questions: 18Answers: 1

    I forgot to remove this.
    Now it is out and the error remains the same.

  • kthorngrenkthorngren Posts: 21,330Questions: 26Answers: 4,951
    edited April 2021 Answer ✓

    If you inspect the page you can see the top <div class="row"> element has this CSS:

    .row {
        margin-right: -15px;
        margin-left: -15px;
    }
    

    Compared to the working which has this:

    div.dtsp-searchPanes, div.row {
        margin-left: 0px;
        margin-right: 0px;
    }
    

    The margin-left: -15px; is the problem. Not sure why the CSS are loaded differently but you could override the CSS in a style element, something like this maybe:

    .row {
        margin-left: 0px;
    }
    

    Kevin

  • RappiRappi Posts: 82Questions: 18Answers: 1

    Thank you!
    I have now adjusted the CSS and it runs. What and why something has changed there, probably only Allan knows...

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Hi,

    Have you updated the page with the change from Kevin? I'm seeing the table overflow to the left and right of the page, and I'm not sure if it was like that originally and that was the problem or not?

    Either way, that effect is caused by using Bootstrap's grid slightly incorrectly. You have a row without a container:

    Wrapping it in a Bootstrap container will fix it.

    Allan

  • RappiRappi Posts: 82Questions: 18Answers: 1

    Hi Allan,

    thanks for your answer.

    I have fix it in the real script, not in the test.

    Rappi

This discussion has been closed.