Closed (fixed)
Project:
Charts
Version:
5.0.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Feb 2022 at 14:00 UTC
Updated:
4 Jul 2023 at 20:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
crutch commentedSorry, this was because no library was installed yet.
Comment #3
hmdnawaz commentedI have the library installed. But I am still getting this error when try to save the graph block in the layout builder.
Comment #4
andileco commented@hmdnawaz, can you make sure you've saved this page (/admin/config/content/charts), clear caches, and then see if you still have an error?
Comment #5
hmdnawaz commentedYes, I re-installed the module and went to the /admin/config/content/charts and saved and clear the caches.
Still, I'm getting this error.
On
/admin/config/content/charts, I do not see any field related to the library.In
web/modules/contrib/charts/src/Element/BaseSettings.php, I printed the $element variable and I see thisThe library value is empty.
Comment #6
nikathone@hmdnawaz here is an obvious question but I think I ask to get make sure that you did enable at least one of the charts library module? Also can you, please, let us know at what line in
web/modules/contrib/charts/src/Element/BaseSettings.phpyou printed the$element?Thank you in advance for providing more information about this issue.
Comment #7
hmdnawaz commentedYes I enabled the highcharts module.
I printed the $element variable just before this if statement. Line # 125
if (!empty($element['#library']) && isset($library_options[$element['#library']])) {Also when I go to the the charts settings page, I don't see the highchart settings there.
Comment #8
andileco commentedSorry for the delay on this, it took a while to figure out how to replicate it. I think this patch should solve the issue. But let's make sure the tests pass.
Comment #10
andileco commentedFixed. @hmdnawaz you will need to save the form at /admin/config/content/charts before you will see the Highcharts Settings as one of the horizontal tabs.