New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chart undefined in Digital Experience Site with Locker enabled #53
Comments
Hi @amboton1, we will need a bit more information to understand the problem:
Thanks ! |
Hi @victorgz , thank you for your quick response. I cloned the project and then i just pushed the code to my scratch org for the test. Then after that i used Chart Builder (drag and drop) on Digital Experience Site Builder and set data source demo. The message was window.Chart not defined. |
Hi again @amboton1 , I am trying to figure out what's going wrong, because I have done some tests and for me it is working fine:
And for all of that, I haven't done any modifications on the Community Security Settings (so Lightning Locker is still active): Some more questions to try to reproduce the problem:
@scolladon any other idea ? |
Hi @victorgz , we used "Build Your Own (LWR)" template where issue exist. Now i've tried with a Partner Central Community and it works, without changing CSP(Locker). So i would say the issue is in Build Your Own (LWR) template. |
@amboton1 exactly, I've checked and the issues comes from the Build Your Own (LWR) template.
The documentation proposes as a solution to implement a custom static resource loader, instead of using the standard Salesforce one. We're going to discuss this internally and see whether it is something that we could add to the current version or not. Meanwhile, I see two workarounds:
|
I am closing this issue for now. |
What is affected by this bug?
Data Visualization - cannot display chart
When does this occur?
When compoent gets loaded.
We have this enabled in digital experience builder:
We have scripts for chart.js implemented inside staticresources.
Chart only works when locker is disabled.
Locker is enabled by default so this our issue might have important impact
The text was updated successfully, but these errors were encountered: