- Issue created by @maxilein
- ๐ซ๐ทFrance Chris64 France
Indeed @maxilein, the library version is an important subject. The new 2.0 module release allows to use the 1.10 datatables library version. See ๐ [META] Keep track of jQuery DataTables library updates in the Drupal implementation Needs review . 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. - Status changed to Needs review
11 months ago 6:45pm 26 January 2024 - ๐ฆ๐นAustria maxilein
Thank 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:
datatables needs datatables/datatables 1.10.21. The version in the libraries folder is 1.XX and not currently supported.
- ๐ซ๐ทFrance Chris64 France
@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 ๐ The module needs a composer.json file Needs review ). The means to get the library version with the
drush show
command would be explained in theREADME.md
file. However, indeed, this version should be reflected in a code file, like.libraries.yml
as you suggest in the IS. - ๐ฌ๐งUnited Kingdom kingfisher64
Hello,
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.
Arijit Acharya โ made their first commit to this issueโs fork.
- Merge request !223399504-make-transparent-which: Added hook_requirements, for checking and status reporting. โ (Merged) created by arijit acharya
- ๐ฎ๐ณIndia Indranil Roy kolkata
Hi,
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 patch.
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.
- Status changed to RTBC
4 months ago 7:57am 7 August 2024 - ๐ซ๐ทFrance dqd London | N.Y.C | Paris | Hamburg | Berlin
Good finding and good work. +1
-
dqd โ
committed 25924a28 on 2.x authored by
arijit acharya โ
Issue #3399504 by arijit acharya, maxilein, Chris64: Add...
-
dqd โ
committed 25924a28 on 2.x authored by
arijit acharya โ
- Status changed to Fixed
4 months ago 1:45pm 30 August 2024 Automatically closed - issue fixed for 2 weeks with no activity.
- ๐บ๐ธUnited States NicholasS
I 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...// Check if the essential CSS and JavaScript files exist. $essential_assets = [ 'css' => ['jquery.dataTables.css', 'dataTables.bootstrap.css'], 'js' => ['jquery.dataTables.js', 'dataTables.bootstrap.js'], ];
But the libraries.yml only loads the non-bootstrap assets.
datatables_core: version: 1.10 js: /libraries/datatables/media/js/jquery.dataTables.js: {} css: component: /libraries/datatables/media/css/jquery.dataTables.css: {} dependencies: - core/jquery
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.
- ๐บ๐ธUnited States NicholasS
Looks like the path to check for assets is incorrect, composer does not place the datatables library in a subfolder called datatables.
I'll create a new issue about this.