SSL and Mixed Content Issue: VC Google Map


  • Member
    viablethought
    June 6, 2016 at 12:09 am #28844

    Hello -

    I have an SSL cert installed on my server as well as using Cloudflare for my website. I have installed the SSL Insecure Content Fixer plugin and it worked great for everything, with the exception of the map I have embedded on my Contact page.

    It seems that the JS being dumped out onto the page from the VC Google Map shortcode is the issue for my “Mixed Content” error. It is this line that is causing the problem:

    $content .= 'var image = "'. esc_url($markerimage) .'";';

    Which is on Line 173 of the boc_gmap.php file. On the front end though, it is placing the uploaded marker correctly, but it is also spitting out additional code below it:

    geocoder_map_148.geocode( { 'address': address}, function(results, status) {
    					if (status == google.maps.GeocoderStatus.OK) {
    						map_148.setCenter(results[0].geometry.location);
    						var image = "https://omniacreativestudio.com/wp-content/uploads/2016/03/omnia-map-marker.png";
    							var marker = new google.maps.Marker({
    								map: map_148,
    								icon: image,
    								position: map_148.getCenter()
    							});
    							
    								var contentString = 'Omnia Creative Studio<br />Call Today 856-322-2464';
    								var infowindow = new google.maps.InfoWindow({
    									content: contentString
    								});
    
    								google.maps.event.addListener(marker, 'click', function() {
    								  infowindow.open(map_148,marker);
    								});
    								
    					} else {
    						alert("Geocode was not successful for the following reason: " + status);
    					}
    				});
    				var image = "http://556";
    					var marker = new google.maps.Marker({
    					map: map_148,
    					icon: image,
    					position: map_148.getCenter()
    				});

    You can see where the “var image” is spitting out “http://556″ which is what is causing the issue with Mixed Content, and for some reason the plugin isn’t able to pick up on it and remove the “http:” part of the URI.

    How can I rectify this?

    Sorry, this forum is for verified users only. Please Login or Register to continue

Comments are closed.