1

MX Google Maps does not display in a channel form when the page is loaded over HTTPS. I get the error:

The page at 'https://www.fakesite.com/members/manage-listing/474' was loaded over HTTPS, but requested an insecure resource 'http://maps.google.com/maps/api/js?sensor=false'. This request has been blocked; the content must be served over HTTPS.

It also stops all of my other JavaScript from running

1

edit the file /system/expressionengine/expressionengine/third_party/mx_google_map/ft.mx_google_map.php and change the following lines

On line 135, change:

ee()->cp->add_to_foot('<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>');

To

ee()->cp->add_to_foot('<script type="text/javascript" src="//maps.google.com/maps/api/js?sensor=false"></script>');

and on line 856, change:

ee()->cp->add_to_foot('<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>');

To

ee()->cp->add_to_foot('<script type="text/javascript" src="//maps.google.com/maps/api/js?sensor=false"></script>');

By removing the "http:" from both of the urls you are allowing the browser to choose which protocol to use.

3
  • Is this something you need to submit a pull request to github.com/MaxLazar/mx-google-map-v1 for?
    – Bryan
    Mar 10 '15 at 23:58
  • Please do, we are dealing with this issue for several modules/addons for different reasons.
    – jrothafer
    Mar 11 '15 at 13:02
  • I probably will as soon as I get the chance, good idea thank you!! Mar 18 '15 at 4:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.