Uncaught ReferenceError: d3 is not defined in WordPress Visual Composer

44
May 18, 2019, at 1:10 PM

I want to edit some images which can only be done in WPBakery Page Builder. So, when I try to edit the page with it, the frontend editor (page builder) doesn't loads. Console shows the following error:

Although, the library script tag is added before the tag which is using this library:

I don't know if any of this makes sense, but, yeah, I have tried these solutions because they were mentioned on different forums:

  • Adding charset="utf-8" to external script tag.
  • Moving the script tag inside Raw HTML element.
  • Using $(document).ready(function(){}) to enclose the whole of second script. So, that it loads after everything is loaded.

Unfortunately, none of these worked for me.

The page builder works fine on pages where I don't use the d3.js library. And, the visualization works fine WHEN NOT IN PAGE BUILDER - the library loads up and the visualization is displayed. You can check it out here: https://conductscience.com/age-when-charles-darwin/

Also, please note that I don't have access to any of the theme files. So, I can't make any changes to functions.php or any other file.

READ ALSO
Is a semicolon required before a function closure in javascript?

Is a semicolon required before a function closure in javascript?

I'm wondering if this is a compiler bug, or this is the way it's supposed to be

26
Custom object lab for my javascript class not running properly

Custom object lab for my javascript class not running properly

I'm working on a lab for my Javascript class and it is a lab dedicated to custom objects and constructor functionsobject

29
How do I publish video that is dynamically loaded?

How do I publish video that is dynamically loaded?

OpenTok has a demo that publishes a video from a fileI want to publish a video that is dynamically loaded from Firebase based on their basic demo but the publisher is not displaying the video I pull from firestore and I believe it has to do with when I call the publish...

23
What is || doing in this code? and the purpose of this code is something like switch(condition) in C?

What is || doing in this code? and the purpose of this code is something like switch(condition) in C?

Please tell me What this code is doing? are those keys are trying to imitate Switch(Condition) syntax like in C? and I think that || Or operator is not just comparing left and right and returning T or F, it returns left if it was true, and right if it was false I guess?!!

12