[Everywhere] GMaps JS API multiple times on this page

This topic contains 9 replies, has 3 voices, and was last updated by  Naveen Giri 4 years, 4 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #521773

    Brigitte
    Full Member
    Post count: 235

    Hello,

    Please, I don’t understand why but here is the error I have on all my pages of the site:

    You have included the Google Maps JavaScript API multiple times on this page. This may cause unexpected errors. js:165:216

    Please how fix that ? I use Listimia GeoDirectory theme + last version of GD.

    #521774

    Brigitte
    Full Member
    Post count: 235
    This reply has been marked as private.
    #521805

    Alex Rollin
    Moderator
    Post count: 27815

    Please post WP Admin so the developers can check the settings.

    #521816

    Brigitte
    Full Member
    Post count: 235
    This reply has been marked as private.
    #522228

    Brigitte
    Full Member
    Post count: 235

    I did research on the Internet, and I saw that some people also had this problem. Sometimes it’s a theme issue, generally fixed with a function that disables duplicate the GMaps APi. Maybe if you could just confirm that it is, I don’t bother you anymore, and I ask the theme developer.

    But if the problem is related to GeoDirectory, maybe you could tell me if I should deactivate something so that I no longer have this critical error?

    Thanks,
    Best Regards,
    Ady.

    #522358

    Naveen Giri
    Moderator
    Post count: 1559

    Hi Adrien,

    the other map api is loading from Yoast SEO: Local plugin.
    Please share FTP if you want me to apply patch for it.

    Thanks

    #522377

    Brigitte
    Full Member
    Post count: 235
    This reply has been marked as private.
    #522394

    Naveen Giri
    Moderator
    Post count: 1559

    Hi Adrien,

    Please use it and check.

    
    function wpdocs_dequeue_script() {
       wp_dequeue_script( 'maps-geocoder' );
    }
    add_action( 'wp_print_scripts', 'wpdocs_dequeue_script', 100 );
    

    Thanks

    #522405

    Brigitte
    Full Member
    Post count: 235

    Works perfectly, thank you very much Naveen.

    I have been working with you for several years, and I have no words to tell the whole team how incomparable the quality of support is with any others.

    I wish you a happy holiday end year!

    #522513

    Naveen Giri
    Moderator
    Post count: 1559

    Thanks for your kind words @Adrien.

    Merry Christmas 🙂

Viewing 10 posts - 1 through 10 (of 10 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket