Maps in Narrated Web Site not working for me

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Maps in Narrated Web Site not working for me

Charlie Dennett
Hi,

I've been using GRAMPS for years and have it generate a web site for me.  I've been rather inactive in my genealogy work but as I close in on retirement, I want to start working on it again.  When I looked at my web site, one thing I noticed is that the maps for all the locations were blank.   All I see is an empty space where the map should be.  I generated the web site with both Google maps and Open Street Map but it made no difference.  I'm in the process of looking through the mailing list archives for reports of a similar problem but have not found anything yet.  I know they worked at one time.  Maybe a year ago or so.

Any suggestions of what I might be doing wrong, or where to start looking for problems would be appreciated.  Meanwhile, I'll keep looking in the archives.

System I use is Linux - Fedora 27.  GRAMPS is the latest version available from the fedora repository - 4.2.6.  All other packages are up to date as of a week ago.

--
Thanks,
Charlie Dennett


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: Maps in Narrated Web Site not working for me

Tom Hughes
On 13/12/17 14:01, Charlie Dennett wrote:

> I've been using GRAMPS for years and have it generate a web site for
> me.  I've been rather inactive in my genealogy work but as I close in on
> retirement, I want to start working on it again.  When I looked at my
> web site, one thing I noticed is that the maps for all the locations
> were blank.   All I see is an empty space where the map should be.  I
> generated the web site with both Google maps and Open Street Map but it
> made no difference.  I'm in the process of looking through the mailing
> list archives for reports of a similar problem but have not found
> anything yet.  I know they worked at one time.  Maybe a year ago or so.
>
> Any suggestions of what I might be doing wrong, or where to start
> looking for problems would be appreciated.  Meanwhile, I'll keep looking
> in the archives.

Easy - just look at the javascript console:

Blocked loading mixed active content
"http://maps.googleapis.com/maps/api/js?sensor=false"
Loading failed for the <script> with source
http://maps.googleapis.com/maps/api/js?sensor=false”.

So the problem is that you are trying to load the google api code over
http from an https site and browsers no longer allow loading active
content like javascript over http for a site whose main URL is https.

Change it to load that over https and you should be fine.

Tom

--
Tom Hughes ([hidden email])
http://compton.nu/

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
--
Tom Hughes (tom@compton.nu)
http://compton.nu/
Reply | Threaded
Open this post in threaded view
|

Re: Maps in Narrated Web Site not working for me

Charlie Dennett


On Wed, Dec 13, 2017 at 9:13 AM, Tom Hughes <[hidden email]> wrote:
On 13/12/17 14:01, Charlie Dennett wrote:

I've been using GRAMPS for years and have it generate a web site for me.  I've been rather inactive in my genealogy work but as I close in on retirement, I want to start working on it again.  When I looked at my web site, one thing I noticed is that the maps for all the locations were blank.   All I see is an empty space where the map should be.  I generated the web site with both Google maps and Open Street Map but it made no difference.  I'm in the process of looking through the mailing list archives for reports of a similar problem but have not found anything yet.  I know they worked at one time.  Maybe a year ago or so.

Any suggestions of what I might be doing wrong, or where to start looking for problems would be appreciated.  Meanwhile, I'll keep looking in the archives.

Easy - just look at the javascript console:

Blocked loading mixed active content "http://maps.googleapis.com/maps/api/js?sensor=false"
Loading failed for the <script> with source “http://maps.googleapis.com/maps/api/js?sensor=false”.

So the problem is that you are trying to load the google api code over http from an https site and browsers no longer allow loading active content like javascript over http for a site whose main URL is https.

Change it to load that over https and you should be fine.

Tom

--
Tom Hughes ([hidden email])
http://compton.nu/


Ah, thanks for that.  I recently switched my web site to use https.  Problem is, I don't insert those lines you mentioned myself.  It's all done by GRAMPS.  A assume it's hard coded in one of the python files.  Unless there is an option I missed to generate an https web site rather than an http one.  Hopefully, the API code is available over https.  I will explore further.

Thanks again!
--
Charlie

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: Maps in Narrated Web Site not working for me

Charlie Dennett
On Wed, Dec 13, 2017 at 9:26 AM, Charlie Dennett <[hidden email]> wrote:


On Wed, Dec 13, 2017 at 9:13 AM, Tom Hughes <[hidden email]> wrote:
On 13/12/17 14:01, Charlie Dennett wrote:

I've been using GRAMPS for years and have it generate a web site for me.  I've been rather inactive in my genealogy work but as I close in on retirement, I want to start working on it again.  When I looked at my web site, one thing I noticed is that the maps for all the locations were blank.   All I see is an empty space where the map should be.  I generated the web site with both Google maps and Open Street Map but it made no difference.  I'm in the process of looking through the mailing list archives for reports of a similar problem but have not found anything yet.  I know they worked at one time.  Maybe a year ago or so.

Any suggestions of what I might be doing wrong, or where to start looking for problems would be appreciated.  Meanwhile, I'll keep looking in the archives.

Easy - just look at the javascript console:

Blocked loading mixed active content "http://maps.googleapis.com/maps/api/js?sensor=false"
Loading failed for the <script> with source “http://maps.googleapis.com/maps/api/js?sensor=false”.

So the problem is that you are trying to load the google api code over http from an https site and browsers no longer allow loading active content like javascript over http for a site whose main URL is https.

Change it to load that over https and you should be fine.

Tom

--
Tom Hughes ([hidden email])
http://compton.nu/


Ah, thanks for that.  I recently switched my web site to use https.  Problem is, I don't insert those lines you mentioned myself.  It's all done by GRAMPS.  A assume it's hard coded in one of the python files.  Unless there is an option I missed to generate an https web site rather than an http one.  Hopefully, the API code is available over https.  I will explore further.

Thanks again!
--
Charlie

Yes, I found the python file where the URL for the map API was specified.  It is hardcoded as http.  I changed it to https for both APIs.  They appear in two locations in the file.  One for the place map and one for the family map.  Openstreetmap didn't work.  It may not be available over https.  Just guessing at that as I did not investigate further.  But, when I switched to google maps, it worked.


Thanks for the assistance.  

--
Charlie

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: Maps in Narrated Web Site not working for me

Tom Hughes
On 13/12/17 14:48, Charlie Dennett wrote:

> Yes, I found the python file where the URL for the map API was
> specified.  It is hardcoded as http.  I changed it to https for both
> APIs.  They appear in two locations in the file.  One for the place map
> and one for the family map.  Openstreetmap didn't work.  It may not be
> available over https.  Just guessing at that as I did not investigate
> further.  But, when I switched to google maps, it worked.

OpenStreetMap should be available over https - what URL exactly is it
try to load?

Tom (OpenStreetMap server admin ;-))

--
Tom Hughes ([hidden email])
http://compton.nu/

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
--
Tom Hughes (tom@compton.nu)
http://compton.nu/
Reply | Threaded
Open this post in threaded view
|

Re: Maps in Narrated Web Site not working for me

Charlie Dennett


On Wed, Dec 13, 2017 at 9:50 AM, Tom Hughes <[hidden email]> wrote:
On 13/12/17 14:48, Charlie Dennett wrote:

Yes, I found the python file where the URL for the map API was specified.  It is hardcoded as http.  I changed it to https for both APIs.  They appear in two locations in the file.  One for the place map and one for the family map.  Openstreetmap didn't work.  It may not be available over https.  Just guessing at that as I did not investigate further.  But, when I switched to google maps, it worked.

OpenStreetMap should be available over https - what URL exactly is it try to load?

Tom (OpenStreetMap server admin ;-))
 
Right now I have the site using openstreetmaps.  If I view the source for a for a particular place page I can see where it is using https:

<script src="https://www.openlayers.org/api/OpenLayers.js" type="text/javascript"></script>

But, when I use the console (I'm using chrome browser) I get this message:
Mixed Content: The page at 'https://dennett.org/genealogy/plc/n/e/OPTFAYVULIUUHUNHEN.html' was loaded over HTTPS, but requested an insecure script 'http://openlayers.org/api/OpenLayers.js'. This request has been blocked; the content must be served over HTTPS.

I see other places in the python file that use http.  I will try changing those to https and regenerate the web site to see if that fixes it.
--
Charlie

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: Maps in Narrated Web Site not working for me

Tom Hughes
On 13/12/17 15:06, Charlie Dennett wrote:

> Right now I have the site using openstreetmaps.  If I view the source
> for a for a particular place page I can see where it is using https:
>
> <script src="https://www.openlayers.org/api/OpenLayers.js"
> type="text/javascript"></script>
>
> But, when I use the console (I'm using chrome browser) I get this message:
> Mixed Content: The page at
> 'https://dennett.org/genealogy/plc/n/e/OPTFAYVULIUUHUNHEN.html' was
> loaded over HTTPS, but requested an insecure script
> 'http://openlayers.org/api/OpenLayers.js'. This request has been
> blocked; the content must be served over HTTPS.
>
> I see other places in the python file that use http.  I will try
> changing those to https and regenerate the web site to see if that fixes it.

Right, but that is openlayers not openstreetmap causing the problem.

There is a fix though - just change it to use:

   https://openlayers.org/api/OpenLayers.js

The reason is that https://www.openlayers.org/ redirects to drop the www
but it also drops the https. That's a bit broken but if you change it
you avoid the redirect and it will load over https.

Tom

--
Tom Hughes ([hidden email])
http://compton.nu/

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
--
Tom Hughes (tom@compton.nu)
http://compton.nu/
Reply | Threaded
Open this post in threaded view
|

Re: Maps in Narrated Web Site not working for me

Charlie Dennett


On Wed, Dec 13, 2017 at 10:40 AM, Tom Hughes <[hidden email]> wrote:
On 13/12/17 15:06, Charlie Dennett wrote:

Right now I have the site using openstreetmaps.  If I view the source for a for a particular place page I can see where it is using https:

<script src="https://www.openlayers.org/api/OpenLayers.js" type="text/javascript"></script>

But, when I use the console (I'm using chrome browser) I get this message:
Mixed Content: The page at 'https://dennett.org/genealogy/plc/n/e/OPTFAYVULIUUHUNHEN.html' was loaded over HTTPS, but requested an insecure script 'http://openlayers.org/api/OpenLayers.js'. This request has been blocked; the content must be served over HTTPS.

I see other places in the python file that use http.  I will try changing those to https and regenerate the web site to see if that fixes it.

Right, but that is openlayers not openstreetmap causing the problem.

There is a fix though - just change it to use:

  https://openlayers.org/api/OpenLayers.js

The reason is that https://www.openlayers.org/ redirects to drop the www but it also drops the https. That's a bit broken but if you change it you avoid the redirect and it will load over https.

Tom

That did it!  Thanks!

--
Charlie

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: Maps in Narrated Web Site not working for me

Ron Johnson
In reply to this post by Charlie Dennett
On 12/13/2017 09:40 AM, Tom Hughes wrote:

> On 13/12/17 15:06, Charlie Dennett wrote:
>
>> Right now I have the site using openstreetmaps.  If I view the source for
>> a for a particular place page I can see where it is using https:
>>
>> <script src="https://www.openlayers.org/api/OpenLayers.js"
>> type="text/javascript"></script>
>>
>> But, when I use the console (I'm using chrome browser) I get this message:
>> Mixed Content: The page at
>> 'https://dennett.org/genealogy/plc/n/e/OPTFAYVULIUUHUNHEN.html' was
>> loaded over HTTPS, but requested an insecure script
>> 'http://openlayers.org/api/OpenLayers.js'. This request has been blocked;
>> the content must be served over HTTPS.
>>
>> I see other places in the python file that use http.  I will try changing
>> those to https and regenerate the web site to see if that fixes it.
>
> Right, but that is openlayers not openstreetmap causing the problem.
>
> There is a fix though - just change it to use:
>
>   https://openlayers.org/api/OpenLayers.js
>
> The reason is that https://www.openlayers.org/ redirects to drop the www
> but it also drops the https. That's a bit broken but if you change it you
> avoid the redirect and it will load over https.

Should a bug be opened to fix this upstream?


--
World Peace Through Nuclear Pacification


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org