Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #234903

    guy_b
    Participant

    ..This may cause unexpected errors.

    Hi Guys,

    How can I prevent this from happening?

    I assume it just needs a condition to check for the script, and if it already exists not to load it again?

    Thanks

    Guy

    #234911

    guy_b
    Participant

    Not to worry, problem solved! 🙂

    #235104

    Nico
    Moderator

    Glad that you have figured it out.

    Let us know if you need anything else.

    Cheers!

    #300250

    MulderDSM
    Participant

    I’m seeing this same error in my console. How do we prevent this?

    #300691

    Rue Nel
    Moderator

    Hey There @mulderdsm,

    Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    Thank you.

    #302899

    guy_b
    Participant

    @mulderdsm, this happens when another plugin is loading the same script on the same page.

    In my case, I had the Ubermenu loading Google Maps, and then attempted to insert a map using the X shortcode on the same page, resulting in the error.

    Most (good) plugins that allow one to insert a Google Map also have the option to disable the actual script if it is being loaded elsewhere because it is such a common issue, so you should first check if that is an option in whatever additional map plugin (or plugin which includes the map), because I don’t think X has the option.

    (feature request, X. All good plugins have this option).

    It is also possible to dequeue one of the scripts by writing a php function (but first check if you can disable it via whatever plugin is the source of the duplicate).

    #303199

    Paul R
    Moderator

    Hi Guy,

    Thanks for sharing.

    Feature request Noted.

    #347333

    siriuslux
    Participant

    I got this issue all day. All the time I was thinking there is an issue with my cache plugin and cdn. Also re-install, deactivate all the plugins..inspector advise about js and google map api from the subject of this forum subject.. I was wrong and the answer was always something simple.

    solution for CHROME browser>
    > chrome> click on the customize & control button > more tools > clear browsing data > tick : cookies and cached images row > clear browsing data. > the editor should load properly now.

    hope i been helpful.
    p.s. thanks for the magic theme.co

    #347457

    Rad
    Moderator

    Thanks for sharing! That’s helpful 😉