Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maps don't render on https page #182

Open
RMPnet-UK opened this issue Jun 14, 2017 · 3 comments
Open

Maps don't render on https page #182

RMPnet-UK opened this issue Jun 14, 2017 · 3 comments

Comments

@RMPnet-UK
Copy link

RMPnet-UK commented Jun 14, 2017

after applying the fix #141 the map doesn't render because the maps.google scripts are referenced by http:// not https://

Mixed Content: The page at 'https://www.domain.uk/mappage.html' was loaded over HTTPS, but requested an insecure script 'http://maps.google.com/maps/api/js?sensor=false'. This request has been blocked; the content must be served over HTTPS.

I updated core/components/mxcalendars/model/mxcalendars/google_geoloc.class.inc.php
changing
$fullurl = 'http://maps.googleapis.com/maps/api/geocode/json?address='.urlencode($address).'&sensor=true'. (!empty($this->region) ? '&region='.$this->region : '');
to
$fullurl = 'https://maps.googleapis.com/maps/api/geocode/json?address='.urlencode($address).'&sensor=true'. (!empty($this->region) ? '&region='.$this->region : '');

and core/components/mxcalendars/model/mxcalendars/mxcalendars.class.php
changing
private function _getMap($address=null,$gmapRegion='',$width='500px',$height='500px', $gmapLib='http://maps.google.com/maps/api/js?sensor=false'){
to
private function _getMap($address=null,$gmapRegion='',$width='500px',$height='500px', $gmapLib='https://maps.google.com/maps/api/js?sensor=false'){

and change
return $googleMap.'<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
to
return $googleMap.'<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false"></script>

Regards
Keith

@crimsonpixel
Copy link

Made all these amends but maps still don't render. Included API key and still no success...

@sebastian-marinescu
Copy link
Contributor

@crimsonpixel
Copy link

I tried to upload this package but it wouldn't install. I'm using the latest version of MODX 2.7.1 and PHP 7.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants