Support

Account

Forum Replies Created

  • My work-around is a double check as the following code to substitute the function on line 2268:

    	$(document).on('acf/setup_fields', function(e, el) {
    
    		// vars
    		$fields = $(el).find('.acf-google-map');
    
    		// validate
    		if (!$fields.exists()) {
    			return;
    		}
    
    		// validate google
    		if (typeof google === 'undefined') {
    			$.getScript('https://www.google.com/jsapi', function() {
    
    				google.load('maps', '3', {
    					other_params: 'sensor=false&libraries=places',
    					callback: function() {
    
    						$fields.each(function() {
    
    							acf.fields.google_map.set({
    								$el: $(this)
    							}).init();
    
    						});
    
    					}
    				});
    			});
    
    		} else {
    
    			if (typeof google.load != 'function') {
    				$.getScript('https://www.google.com/jsapi', function() {
    
    					google.load('maps', '3', {
    						other_params: 'sensor=false&libraries=places',
    						callback: function() {
    
    							$fields.each(function() {
    
    								acf.fields.google_map.set({
    									$el: $(this)
    								}).init();
    
    							});
    
    						}
    					});
    				});
    
    			} else {
    
    				google.load('maps', '3', {
    					other_params: 'sensor=false&libraries=places',
    					callback: function() {
    
    						$fields.each(function() {
    
    							acf.fields.google_map.set({
    								$el: $(this)
    							}).init();
    
    						});
    
    					}
    				});
    
    			}
    
    		}
    
    	});
    
  • Hi, I’m having the same problem. It seems a conflict with the maps loaded by my Divi theme for integrated page builder.

    TypeError: google.load is not a function
    /wp-content/plugins/advanced-custom-fields/js/input.js?ver=4.4.1
    Line 2300

    Without the page builder (who uses maps too) there are no errors.

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