Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
babbage CreditAttribution: babbage commentedI'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.
Comment #2
babbage CreditAttribution: babbage commentedAh, 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. :)
Comment #3
ryoken CreditAttribution: ryoken commentedThanks 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?
Comment #4
ryoken CreditAttribution: ryoken commentedAfter 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...
Comment #5
rupertj CreditAttribution: rupertj commentedThanks - I've made this change and committed it.