Google chart js library weights

Created on 23 July 2025, 5 days ago

Problem/Motivation

There is a browser console error related to Google's packages not being loaded. Even though they are, eventually, and most things seem to work fine anyway. The weight of the offending javascript library is "-1", removing this weight on the library resolves console errors.

Steps to reproduce

Using bootstrap_barrio as a base theme, open a populated and rendered chart on a page and check the browser console. Uncaught TypeError: google.charts.load is not a function

Proposed resolution

Remove the weighting from the js library. It is present in all sub-modules of the charts module, but I only use Google charts, so that is all the patch contains. It was added in #3197574 but perhaps since then Drupal behaviors and js stability has improved. Event listeners can be safely configured to run before or after charts, so long as charts doesn't put itself ahead, first.

User interface changes

None.

API changes

None.

Data model changes

None.

🐛 Bug report
Status

Active

Version

5.1

Component

Google Charts integration

Created by

🇨🇦Canada scottm316

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

Comments & Activities

Production build 0.71.5 2024