Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Have been using the Webprofiler for a while and haven't noticed any issues until upgrading to Drupal 8.6.1 yesterday. Drupal Status now reports missing D3.js and Highlights.js libraries and references the README.md file for instructions when using composer. After following those instructions to add the libraries, Drupal Status is still reporting them as missing. (Cleared, caches, etc, etc).
Are these needed? If so what is Drupal Status looking for that it's not finding?
Comments
Comment #2
xmacinfoThose two libraries are optional. I never installed those two libraries in the past but I took the opportunity to try this out.
I successfully managed to install D3.js with Composer inside the libraries folder.
Unfortunately, using the same Composer recipe, Hightlight.js keeps being installed in the Vendor directory even if I configure Composer to install this library in the libraries folder.
Comment #3
lussolucaCould you please provide the repositories and installer-paths sections of your composer.json?
Comment #4
AmstercadWhile developing a site using Acquia's Lightning Distribution, I came to this thread via D3.js and Highlight.js errors within the Drupal Status Report.
After hacking around just a bit trying to use the Composer Require installation method as is advised, having initially failed, here's what worked for me:
Changed the instructional line 18 'modules/contrib/devel/webprofiler/README.md' with this difference (and followed that instruction myself):
from:
"libraries/{$name}": ["type:drupal-library"],
to:
The attached patch addresses the errors that I found. Composer Update delivered joy. NOTE that Lightning uses 'docroot' as the drupal-core machine_name while I have seen other Distributions use 'web' instead. YMMV
Comment #5
lpeabody CreditAttribution: lpeabody commented@xmacinfo I had to list the library and component types in the installer-types array in order to get both installing. I actually veered from the README and did not include the repository entries as asked, opting to depend on their presence in packagist instead. Works great for me.
Comment #6
cobenashI use "https://github.com/drupal-composer/drupal-project" as the main Drupal folder structure. After I add these two package to repositories, it worked perfectly.
However, I don't need to add step2 because drupal-composer already added .
Comment #7
william.jieh CreditAttribution: william.jieh commented@Amstercad, thanks! Your solution works for me!
Comment #8
Kojo Unsui CreditAttribution: Kojo Unsui commentedIn Drupal 8.7.8 with Lightning distribution with webprofiler 8.x-2.1, strictly following the steps in README.md worked as a charm. Composer/installers was the good point.
Comment #9
moshe weitzman CreditAttribution: moshe weitzman at Commonwealth of Massachusetts commentedSeems like there is nothing left to do here.
Comment #10
Rar9 CreditAttribution: Rar9 commentedLooking at the git the
d3/d3 latest is 5.14.2
components/highlights is 9.16.2
Is it recommended to update the zip to these versions??
I tried but D8.80 compains even with 9.7.0 highlight.js
Comment #11
karolus CreditAttribution: karolus as a volunteer commented@Rar9,
I would strongly suggest testing out how the visualizations render when updating D3 and related projects.
Due to significant changes between v.3 and v.5, it's quite possible that existing dataviz built for D3 v.3 will break.
At that point, it's pretty much either using D3 v.3 or refactoring the visualizations.
Comment #12
vrwired CreditAttribution: vrwired commentedThis process verified to work on my side for D8.9.1:
https://www.drupal.org/project/devel/issues/2998760#comment-13345564
The libraries are indeed installed correctly via composer - note that you may need to adjust your path - i.e. web(or docroot)/libraries/
However, even with highlightjs correctly installed, status reports not found. For d3js, status report no longer not finding it. Seems may need something still then for highlightjs.