Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #28431

    Hi Kriesi,

    I’ve got a contact page with a 1/1 section and Widget Area specified. Whenever I add a Google Map widget with longtitude / latitude I get the following error on in console (with the map NOT displaying):

    Uncaught ReferenceError: google is not defined

    Any help would be appreciated.

    We’re running Enfold, 2.0, WP 3.6

    #137522

    We’ve got a demo site setup if you need to take a look: http://goo.gl/oSZLN7

    #137523

    Try following – open up enfoldframeworkphpclass-framework-widgets.php and replace

    if(empty($avia_config['g_maps_widget_active']))
    {
    $output .= "<script type='text/javascript' src='$prefix://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false'></script>";
    $avia_config['g_maps_widget_active'] = 0;
    }

    with

    if(empty($avia_config['g_maps_widget_active']))
    {
    $avia_config['g_maps_widget_active'] = 0;
    }

    if(apply_filters('avia_google_maps_widget_load_api', true, $avia_config['g_maps_widget_active']))
    {
    wp_register_script( 'avia-google-maps-api', $prefix.'://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false', array('jquery'), '1', false);
    wp_enqueue_script( 'avia-google-maps-api' );
    }

    #137524

    Hi,

    I also get a JS error, though different, when not even using the Google Map widget at all. This is the error:

    “Uncaught TypeError: Cannot read property ‘data’ of undefined” in avia_google_maps_widget.js

    It is preventing other widgets from being saved using the BlackStudio TinyMCE Widget plugin.

    #137525

    Re the above post – Just want to add that the changes in the text widgets seem to save on the back-end, but it’s on the front-end where the change does not appear.

    Line 27 is where the problem is:

    if(settings.data.search(‘action=save-widget’) != -1 && settings.data.search(‘id_base=’ + widget_id_base) != -1)

    ETA: I commented out the problem code and it did not solve the problem. So it isn’t effecting saving widgets for me. Sorry for hijacking the thread.

    #137526

    We’ll fix this in the next version. For now open up avia_google_maps_widget.js and replace

    $('.widgets-sortables').ajaxSuccess(function(e, xhr, settings){

    var widget_id_base = 'avia_google_maps';

    if(settings.data.search('action=save-widget') != -1 && settings.data.search('id_base=' + widget_id_base) != -1)

    with

    $(document).ajaxSuccess(function(e, xhr, settings){

    var widget_id_base = 'avia_google_maps';

    if(settings && settings.data.search('action=save-widget') != -1 && settings.data.search('id_base=' + widget_id_base) != -1)

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

The topic ‘Broken Google Map Widget’ is closed to new replies.