Closed (fixed)
Project:
Charts
Version:
5.1.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
14 Jan 2025 at 12:15 UTC
Updated:
29 Jan 2025 at 17:44 UTC
Jump to comment: Most recent
After updating the Charts from 5.1.0 to 5.1.2 I noticed a problem similar to this issue #3461914:
Warning: Undefined array key "connect_nulls" in Drupal\charts\Plugin\views\style\ChartsPluginStyleChart->render() (line 336 of /var/www/html/modules/contrib/charts/src/Plugin/views/style/ChartsPluginStyleChart.php)
here is the related part of the code:
'#connect_nulls' => $chart_settings['display']['connect_nulls'],
Update the Charts from 5.1.0 to 5.1.2, visit any page, and check admin/reports/dblog for Warning: Undefined array key "connect_nulls"
'#connect_nulls' => $chart_settings['display']['connect_nulls'] ?? FALSE,
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 #3
maxilein commentedI have the same error and if you google it there are a view others.
Comment #4
almador commented@maxilein you could apply the patch from this diff:
https://git.drupalcode.org/project/charts/-/merge_requests/130.diff
Short instruction (if needed)::
First, download it to your site's root patches folder. (for example /var/www/patches/130.diff)
After that:
composer require cweagans/composer-patchesand add a patch at the bottom of the composer.json "extra" section
Comment #6
andileco commentedApologies for letting this warning slip in. @almador - I have updated it to use !empty() rather than ?? FALSE to ensure that the result is boolean. If tests pass, I will commit to dev.
If you want to remove the error but don't want to patch yet, just re-save your view.
Comment #7
andileco commented