Support » Plugin: WP Google Maps » Maps only work when logged in, REST not blocked

  • Resolved redkite

    (@redkite)


    I saw the notes about the REST API being blocked and found that to be the case in iThemes Security – I cleared that setting, but the maps are still only showing if logged in:

    https://theratogs.com/how-to/global-distributors/

    This is the console error:

    Uncaught TypeError: Cannot read property 'createInstance' of undefined
        at HTMLDocument.<anonymous> (wp-google-maps-pro.min.js?ver=8.1.13+pro-8.1.12:1)
        at S.fn.init.n.fn.ready.n.fn.init.ready ((index):3)
        at s.fn.init.S.fn.init (jquery.min.js:2)
        at new s.fn.init (jquery-migrate.min.js:2)
        at S (jquery.min.js:2)
        at HTMLDocument.<anonymous> (wp-google-maps-pro.min.js?ver=8.1.13+pro-8.1.12:1)
        at HTMLDocument.<anonymous> ((index):3)
        at RocketLazyLoadScripts._triggerDOMContentLoaded ((index):3)
        at async RocketLazyLoadScripts._loadEverythingNow ((index):3)

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support stevendebeer

    (@stevendebeer)

    Hi there,

    Thank you so much for getting in touch, we really appreciate your time.

    I have taken a closer look and it seems the WP Google Maps scripts are being affected by the rocketlazyload plugin which affects how the scripts for the maps load, meaning that they may now be loading in the incorrect order as an example.

    Might I kindly suggest perhaps adding exceptions in place for the WP Google Maps scripts?

    Additionally, might I kindly ask you to get in touch with us directly so that we might take a closer look?

    Thread Starter redkite

    (@redkite)

    I did put in a message on the Pro plugin page and they asked me to disable lazy loading – I did that by removing BJ Lazy Load (redundant) and then deactiveted WP Rocket but am still getting the same issue with the maps only loading when logged in.

    I added an exception for Google Maps in WP Rocket just now, and then tried disabling caching completely only on the map pages. That seems to have finally worked.

    Hi @redkite My google maps is showing the same issue and I am running “WP Rocket” as well. When I deactivate WP Rocket the map is visible.
    Can you help me how to turn off WP Rocket for “WP Google Maps”?

    Thank you in advance and best regards
    Daniela

    Thread Starter redkite

    (@redkite)

    I disabled WP Rocket on the pages with maps (there’s a setting in the editor) and just in case, added this to Excluded JS Files under the checked Delay JS Execution section in the File Optimization tab of WP Rocket settings:

    wp-google-maps-pro-min.js

    That worked for me at least.

    Hi @redkite
    Thank you for your fast reply and thank you for your help!
    I installed WP Rocket in order to make the website loading faster – mainly because of the Slider on top of the front page. And as we are running a One-Pager where the maps are on frontpage your trick might not help.

    But it sounded as if the issue showed up on your place after an update. I recognized, that WP Google Maps has been updated – but not sure if WP Rocket has received an update….

    I will reach out to WP Rocket support.
    Thank you for your help!
    Best wishes

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.