This is the META issue to keep track of the DataTables plugin library updates which need to get implemented in the DataTables implementation Drupal module. D8 patches first please, backports D7 need to be discussed. It will also track the shift of JQuery fading from DataTables. https://datatables.net/examples/non_jquery/init.html. Link broken. jQuery dependency IS NOT taken away from DataTables, as it seems, so let us keep track here and here.
I started this issue to prevent more clutter and to close the forked efforts here in the issue queue. Some issues have been started creating own branches of the implementation and with mixed code, parts of the original code with new parts and new features or mixed code with changes in the original library and mixed quality regarding the Drupal coding standards. This way it is impossible to keep track of changes or new upcoming errors. Especially without any discussion about IF WE want to modify the original library code (which is not recommended since we can't know if the library keeps its MIT license in future). We can't merge code this way. We need to split the different actions and need to patch them step by step against the existing branches. Please join here, if you are interested in this plan (library update support).
To show our users and contributors that the maintainers are willing to push the DataTables implementation Drupal module to its next level and that we need a smart idea how we can easily keep track of the quite frequently jQuery library updates and how to support them in the module we need a META issue. This is the one.
Feel free to post ideas or points to discuss or library update patches against the latest 8.x- dev. But please let's split features! This issue is ONLY for keeping track of DataTable library updates and its implementation in the Drupal module. No other features should be added in patches here. We will link other issues here, where new features are build.
EDIT: Apart from that -> #3389529: New DataTables Slack channel to discuss changes & progess and quick reach out.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 2999400-8.patch | 2.17 KB | chris64 |
Comments
Comment #2
dqdComment #3
gloriaswebtech commentedComment #4
govcoder commentedIs this effort abandoned? Being asked to update datatables to 1.10.22 due to a security vulnerability, if it is not being maintained anymore I will let the site owners know they will need to remove it and find another solution.
https://security.snyk.io/vuln/SNYK-JS-DATATABLESNET-598806
Comment #5
dqd@GovCoder: As I already sad in another issue. By all my willing to be kind and respectful in any situation: You should really rethink your attitude. No, not abondoned, but these efforts are made by all (including you). So if somebody wants to get things go on faster is kindly invited to contribute to the issue since this is community work we all do on a voluntary basis. More detailed I already answered to you over there: https://www.drupal.org/project/datatables/issues/3306817#comment-14874306
Apart from that: Thanks @gtucker6 making a quick text fix for me. +1 Wrote this is issue after 3 nights no sleep.
Well ... If your only "work" for the "site owners" is that you actually just wait and hand over the work of others, the "site owners" maybe should rather find another solution too? ;-)
Comment #6
dqdApart from that fuzz and to come back to the issue content we also should take the latest tendency into account that many projects put jQuery out of core. So Drupal does in version 10 and above. The question I would like to ask in the round is if we just stick with jQuery or if we work around it to support same funtionality with vanilla JS in future. Also I would like to hear some insides here from others who are maybe more into the plans of DataTables and its future.
Another route could be to reimplement jQuery DataTable into another more parent roof project not depending in jQuery DataTables only, but providing implementation of many libraries for such type of tables, like Charts does for example.
Comment #7
dqdComment #8
chris64Here a patch for the README.txt file with explanations about jQuery DataTables plugin library update to version 1.10.x with composer. For use with Drupal 10 the patch from #3332040: Drupal core has changed jQuery once() [Drupal 10 compatibility] is assumed applied.
Comment #9
dqdAgain: Awesome work and clarification on the order of things @Chris64, Great work! +1 will review & commit asap.
Comment #10
chris64New release with this patch: see #3332040: Drupal core has changed jQuery once() [Drupal 10 compatibility].
Comment #11
dqdThere is a chance that DataTables moves gradually away from jQuery (EDIT: not in the near future) or runs more and more parallel projects. It was a long road and long discussion with reasonable and worth to read comments of Allen regarding its long holding use of jQuery until end of 2022. But it looks like there is a mind change (EDIT: which does not mean that it is something happen soon). Edited the title regarding this (EDIT: edited back). Back read here if you are interested in his well layout thoughts why still jQuery for so long:
https://datatables.net/forums/discussion/51702/non-jquery-version-of-dat...
As of April 2025 the last comments show that jQuery dependency will probably stay:
https://datatables.net/forums/discussion/comment/237689/#Comment_237689
https://datatables.net/forums/discussion/comment/239470/#Comment_239470
We should follow this (I do for years)
since Drupal dropped jQuery, Bootstrap dropped jQuery and it more and more becomes a unnecessary weight in dependencies. I am free of opinionated positions to jQuery. I think its not smart to follow each horse immediately. But over the years jQuery became more and more incompatible with other (newer) developments in JS. And additionally: it was sustainable and viable when many depended on the same. But when DataTables and 1or 2 others left being the only ones, then it becomes a shift in direction of unbalanced ballast. So it is not a trend following but a final reasonably conclusion to open that door. (EDIT 2026, jQuery still to consider)Read about examples of DataTables without jQuery in progress here for example: https://datatables.net/examples/non_jquery/init.htmlLink has been removed from DataTables since it still depends on jQuery.And your thoughts are welcome here. Its a META. Oh and please feel free to ping me on Slack from time to time since I am very much involved in so many Open Source projects that I sometimes need a reminder if an issue needs my eyes. :-)
Apart from that I have opened a Slack channel for Datatables to push progress: https://www.drupal.org/project/datatables/issues/3389529
Comment #12
dqdComment #13
dqdComment #14
dqdGood news. Drupal will keep jQuery in core, at least in 10 and 11 so we are not in a hurry here ;-)
Comment #15
fgiudici commentedSimple DataTable Integration is a good alternative. Use a pure JS library
Comment #16
jenna.tollersonSo in our build we're using Datatables library v1.13.11 by sourcing it from Asset Packagist using the instructions here: https://www.drupal.org/docs/develop/using-composer/manage-dependencies#t...
And then including the library like so:
composer require npm-asset/datatables.net:^1.13.11.The v2 version of the library is also available from Asset Packagist, but we haven't tried it out yet.
Comment #17
jane_irwinWe need to continue using this module on a D11 site, but the 1.10.21 version of the libraries contain deprecated methods that no longer work with jQuery 4, which is what D11 core uses.
To get around this, we pinned our composer.json to the automated D11 update:
and then overrode our theme's info.yml file to include newer versions of the JS and CSS:
Comment #18
dqdThanks for all the reports in here. Very helpful for maintainers to overview the issues. Please beware that there was some really heavy issue queue and release confusion going on while I was off, which I try to get fixed and communicate with other maintainers asap. Also, as I stated already elsewhere keep track on the dev statements made on DataTables here and here and let me know in case you know more.
As of April 2025 the last comments of Allen show that jQuery dependency will probably stay:
https://datatables.net/forums/discussion/comment/237689/#Comment_237689
https://datatables.net/forums/discussion/comment/239470/#Comment_239470
Comment #19
dqdComment #20
dqdThere is work in progress on #3589761: Updating the Datatables library to 2.x to update the library, with some earlier confusion where I try to help now and detangle it with the contributors on this issue. Followers feel free to chime in over there to have more eyes on it.