Problem/Motivation
On the module page it says that 1.9.x of https://www.datatables.net/download/ is required.
In datatables.libraries.yml it says
datatables_core:
version: 1.10
While there is already a version 1.13.x available.
Does it produce problems upgrading to the current 2.x-dev while not updating the library from 1.9.4 to 1.10 or higher?
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | 2024-09-25_11-08-22.jpg | 109.24 KB | nicholass |
| #9 | before.png | 55.39 KB | indranil roy |
Issue fork datatables-3399504
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
chris64Indeed @maxilein, the library version is an important subject. The new 2.0 module release allows to use the 1.10 datatables library version. See #2999400: [META] Keep track of DataTables library versions. In the installed system it is possible to know the datatables library 1.10 version used using
command composer show datatables/datatables. Actually 1.10.21.Comment #3
chris64Comment #4
maxilein commentedThank you. Now I can figure out which problems come from a higher library ...
Maybe it is possible to add a warning on the status page if the library is not the expected version. That always helps a lot to identify problems.
Something like:
Comment #5
chris64@maxilein, actually installing the datatables library with composer is possible but rather not simple.The next step now is to install this library in simple way via composer (See #3415937: The module needs a composer.json file). The means to get the library version with the
drush showcommand would be explained in theREADME.mdfile. However, indeed, this version should be reflected in a code file, like.libraries.ymlas you suggest in the IS.Comment #6
kingfisher64 commentedHello,
I'm trying to install the data tables module, however, it doesn't look like the library is installed properly. Every now and again I get the following notice:
Warning: file_get_contents(libraries/datatables/media/js/jquery.dataTables.js): Failed to open stream: No such file or directory in Drupal\Core\Asset\JsOptimizer->optimize() (line 39 of core/lib/Drupal/Core/Asset/JsOptimizer.php).I have copied the library from vendor to libraries/datatables/datatables as the documentation.
Is there a way to put the library status under "status report"? I only suggest there as webform and other mods put it there.
Edit: I believe the library is installed now as the error isn't showing but still would be good to have a library install status :)
Comment #9
indranil roy commentedHi,
I have tested the MR, and it is working fine for me. Here are the steps I followed:
1. Installed the module.
2. Applied the MR.
3. Installed the required libraries as described in the readme file.
After installing the libraries properly, the error message no longer appears on the status report page.
Comment #10
indranil roy commentedComment #11
dqdGood finding and good work. +1
Comment #13
dqdComment #15
nicholassI am confused, I have updated datatables, but status report says I am missing assets.
This added a check for the following assets
https://git.drupalcode.org/project/datatables/-/blob/2.x/datatables.modu...
But the libraries.yml only loads the non-bootstrap assets.
So how are we supposed to load the dataTables.bootstrap.css dataTables.bootstrap.js assets? There is nothing in the readme about that. It seems like those should be removed from the status page check for correct assets, some projects don't use bootstrap.
Comment #16
nicholassLooks like the path to check for assets is incorrect, composer does not place the datatables library in a subfolder called datatables.
Should just be
libraries/datatables/*notlibraries/datatables/datatables/*I'll create a new issue about this.