I thought it might be best to open a new issue than reopen a closed one. This is related to https://drupal.org/node/1722356, which seems to have fixed the handling of http and https sites for the "/locationmap" page and the "Interactive map" block.

However, if a "Static image" block is selected, this will cause insecure content (the static map from http://maps.googleapis.com/maps/api/staticmap?...) to be displayed on a https secure page.

Comments

babbage’s picture

I've not looked into this issue so just getting my head around your proposed solution:
a) googleapis.com accepts https connections?
b) your title suggests there is a mechanism in the Drupal relative URLs code to handle URLs to external sites? (which is not the definition of 'relative URLs' I was familiar with)

Any patches welcome, as always. I would otherwise certainly be keen to fix this for users, but my time is heavily oversubscribed so if I am to do this myself it will happen, but it might not happen anytime soon I report.

babbage’s picture

Ah, ok, just looked at the previous patch. This must actually be a simple fix, so I'll try and do it sooner rather than later—though a patch is still welcome and I do give proper attribution on commits. :)

ryoken’s picture

Thanks for your response babbage! :) Like most of us, life gets pretty busy... but I'll see if I can help.

I'm not much of a coder, but I think I've found the "offending" line. I'll need to do some testing first to confirm my suspicions.

I've never made a patch before, maybe I could just paste the code here?

ryoken’s picture

After a bit of testing, the problem appears to be in "locationmap.module" on line 460:

$image_url = 'http://maps.googleapis.com/maps/api/staticmap?zoom=' . variable_get('locationmap_zoom', 5);

This should be changed to:

$image_url = '//maps.googleapis.com/maps/api/staticmap?zoom=' . variable_get('locationmap_zoom', 5);

After this change, the web browser stops complaining about mixed-mode content and the static map block appears normally.

One day when I get some time, I'll set up a proper dev environment and learn how git works so that I can make proper patches...

rupertj’s picture

Issue summary: View changes
Status: Active » Closed (fixed)

Thanks - I've made this change and committed it.