Datatables is not diplayed half of the times.

Datatables is not diplayed half of the times.

Orestis_EPOrestis_EP Posts: 1Questions: 1Answers: 0

Hello, I want to use datatables with Drupal 8 but I dont want to do it with the module Datatables because I have limited actions on tables. So, on every html document(through html template) I placed the CDN script and in libraries folder i placed corectly all the files. In my .js file I copy/paste the code that initializes the datatable and everything was looking good.
But, I observed that:

  1. When I refreshing the page half of the times the array will be rendered as Datatables and the other half will be rendered as simple html.
  2. If I visit the page as anonymous user 99% the table is render as Datatable.

I also dowload the files and use them locally from the server but i got the same result.
I know that here is not a discussion about Drupal but I want to know if you ever have a similar situation.

Answers

  • kthorngrenkthorngren Posts: 21,303Questions: 26Answers: 4,947
    edited December 2018

    When I refreshing the page half of the times the array will be rendered as Datatables and the other half will be rendered as simple html.

    Look for errors in your browser's console. The problem is likely caused by an error stopping Javascript execution.

    Kevin

This discussion has been closed.