Divi 3.0.105 has broken mappress?

Home Forums MapPress Support Divi 3.0.105 has broken mappress?

Tagged: 

This topic contains 2 replies, has 2 voices, and was last updated by  panpanTom 5 months, 4 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #17687

    panpanTom
    Participant

    Hello. I’ve updated DIVI to 3.0.105 and now mappress is failing to load google maps when a simple mappid or complex mashup shortcode is included in a DIVI module. You can see the result here: https://chesterdg.org.uk/00-test-page/
    Mappress will work fine outside of DIVI but is broken inside a DIVI module. The sample map on the settings page is ok and I’ve tried a new API without any success. Everything works fine outside of DIVI.
    Here is the script from the developer tools debug:

    Google Maps API error: MissingKeyMapError https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error
    _.Kb @ js?key&ver=3.0.105:38
    (anonymous) @ common.js:53
    (anonymous) @ common.js:180
    c @ common.js:47
    (anonymous) @ AuthenticationService.Authenticate?1shttps%3A%2F%2Fchesterdg.org.uk%2F00-test-page%2F&callback=_xdc_._2nouw2&token=118139:1
    mappress.min.js?ver=2.47.5:1
    Uncaught TypeError: Cannot read property ‘union’ of undefined
    at mapp.Map.recenter (mappress.min.js?ver=2.47.5:1)
    at Object.callback (mappress.min.js?ver=2.47.5:1)
    at Object.success (mappress.min.js?ver=2.47.5:1)
    at i (jquery.js?ver=1.12.4:2)
    at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4:2)
    at y (jquery.js?ver=1.12.4:4)
    at XMLHttpRequest.c (jquery.js?ver=1.12.4:4)
    recenter @ mappress.min.js?ver=2.47.5:1
    callback @ mappress.min.js?ver=2.47.5:1
    success @ mappress.min.js?ver=2.47.5:1
    i @ jquery.js?ver=1.12.4:2
    fireWith @ jquery.js?ver=1.12.4:2
    y @ jquery.js?ver=1.12.4:4
    c @ jquery.js?ver=1.12.4:4
    XMLHttpRequest.send (async)
    send @ jquery.js?ver=1.12.4:4
    ajax @ jquery.js?ver=1.12.4:4
    ajax @ mappress.min.js?ver=2.47.5:1
    ajaxQuery @ mappress.min.js?ver=2.47.5:1
    display @ mappress.min.js?ver=2.47.5:1
    mapp.load @ mappress.min.js?ver=2.47.5:1
    (anonymous) @ (index):392
    util.js:238 Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys
    vC.j @ util.js:238
    (anonymous) @ js?key&ver=3.0.105:147
    (anonymous) @ js?key&ver=3.0.105:62
    (anonymous) @ js?key&ver=3.0.105:60
    (anonymous) @ js?key&ver=3.0.105:62
    (anonymous) @ js?key&ver=3.0.105:125
    (anonymous) @ js?key&ver=3.0.105:60
    (anonymous) @ js?key&ver=3.0.105:125
    $d @ js?key&ver=3.0.105:62
    Zd.za @ js?key&ver=3.0.105:125
    (anonymous) @ stats.js:1
    util.js:238 Google Maps API warning: InvalidKey https://developers.google.com/maps/documentation/javascript/error-messages#invalid-key
    vC.j @ util.js:238
    (anonymous) @ js?key&ver=3.0.105:147
    (anonymous) @ js?key&ver=3.0.105:62
    (anonymous) @ js?key&ver=3.0.105:60
    (anonymous) @ js?key&ver=3.0.105:62
    (anonymous) @ js?key&ver=3.0.105:125
    (anonymous) @ js?key&ver=3.0.105:60
    (anonymous) @ js?key&ver=3.0.105:125
    $d @ js?key&ver=3.0.105:62
    Zd.za @ js?key&ver=3.0.105:125
    (anonymous) @ stats.js:1

    ____________________________________________________________________
    The changelog of DIVI would seem to suggest a Google API?

    version 3.0.105 ( updated 02-17-2018 )
    – Added compatibility for the latest Google Maps API version and fixed a bug that caused the Visual Builder to crash when a Map Module was added and also resulted in invalid API key errors due to mismatches in API keys and API versions.
    * includes/builder/framework.php
    * epanel/custom_functions.php

    version 3.0.104 ( version skipped for product version consistency )

    version 3.0.103 ( updated 02-16-2018 )
    – Fixed incompatibility with the latest Google Maps API that caused the Visual Builder to freeze when a map module was added to the page.
    – Fixed a bug that caused the Extra Theme Options to malfunction.
    * epanel/js/functions-init.js
    * includes/builder/framework.php

    #17688

    Chris
    Keymaster

    Hi,

    I don’t know how Divi works, so I can only guess at the problem from the error messages.

    The maps API can only be loaded once. If the API is loaded by a theme or another plugin, it can cause a conflict with MapPress. This is described in detail in the FAQ.

    The ‘missingkeymaperror’ indicates Divi (or something else) was trying to load the API without specifying an API key.

    The solution is to disable maps API loading in Divi. There’s often a checkbox for this purpose, or you could contact the Divi authors to ask how to do it.

    #17689

    panpanTom
    Participant

    Hello Chris yes that fixed it. On the DIVI Theme Options page, there is a space for a Google API key (which was blank) and underneath a slider button ‘Enqueue Google Maps Script’. Set the slider from Enable to Disable and mappress is working again.
    The inline help says:
    “Enqueue Google Maps Script. Disable this option to remove the Google Maps API script from your Divi Builder Pages. This may improve compatibility with third party plugins that also enqueue this script. Please Note: Modules that rely on the Google Maps API in order to function properly, such as the Maps and Fullwidth Maps Modules, will still be available but will not function while this option is disabled (unless you manually add Google Maps API script).”

    Thank you for your help. Brilliant.

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

You must be logged in to reply to this topic.