From D9 to D10, charts made on local libraries are not displayed

Created on 31 May 2024, 6 months ago
Updated 29 June 2024, 5 months ago

I was using Charts on D9 with Billboard and D3 libraries locally installed.

Now I need to migrate to Drupal 10 and Charts is set by default with CDN On for external libraries.

Unfortunately, when migration is done (with local libraires still present in directory structure and CDN ON), charts disappear and multiple error messages appear.

For example,

Chrome console : Refused to execute script from 'http://my-website/libraries/d3/d3.min.js?v=5.16.0' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled. drupal.js?v=10.3.0-dev:64

Drupal warning : Warning : file_get_contents(libraries/d3/d3.min.js): Failed to open stream: No such file or directory in Drupal\Core\Asset\JsOptimizer->optimize() (/home/my-website/public_html/my-website/web/core/lib/Drupal/Core/Asset/JsOptimizer.php ligne 39)

After a discussion with Charts maintainer (andileco, thanks again), I have finally removed local libraries from root, let CDN On and drush cr.

Charts built with Views are now back.

The question is can we use local external libraries with Charts on D10?

🐛 Bug report
Status

Active

Version

5.0

Component

Billboard.js integration

Created by

🇫🇷France Toki Caen, Normandy

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024