Print Route "insecure content" problem

Phoca Maps - displaying maps in Joomla! CMS
lukasz
Phoca Member
Phoca Member
Posts: 13
Joined: 14 Feb 2013, 17:24

Print Route "insecure content" problem

Post by lukasz »

Despite setting the option "Enable SSL API Load" to "Yes", there is a browser warning about "insecure content".

Steps to reproduce problem:

Prerequisites:
  • Joomla 3.3 installed
  • Phoca Maps installed
  • Added Map and Marker
  • Phoca Maps Map View assigned to any menu item
  • page must be viewed over SSL to be able to see the problem
Final steps:
  1. Go to Joomla! backend -> Components -> Phoca Maps -> Options -> Display -> Enable SSL API Load (set tu "Yes")
  2. Go to the menu item to which is assigned Phoca Maps Map View.
  3. Enter any address and click "Get Route".
  4. Click the "Print Route".
  5. There is a problem "insecure content" (eg. Google Chrome)
Tested on Joomla 3.3.

The problem is probably due to not taking into account the "Enable SSL API Load" setting when displaying route to print.

Unfortunately, for some reason I did not found a piece of code that is responsible for this. I wanted to immediately fix the problem and send the relevant patch here :)
Last edited by lukasz on 20 Sep 2014, 14:16, edited 1 time in total.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Print Route "insecure content" problem

Post by Jan »

Hi, the parameter means, that you can load the api on ssl server, nothing else, so if you are running your site with ssl (e.g. https // your - site . com ), you can load the maps with ssl api but if you don't run ssl, you will get problems with the certificate :idea:

Jan
If you find Phoca extensions useful, please support the project
lukasz
Phoca Member
Phoca Member
Posts: 13
Joined: 14 Feb 2013, 17:24

Re: Print Route "insecure content" problem

Post by lukasz »

I mean that when I turn on "Enable SSL API Load" option, map displays correctly, but when I click "Print Route" in new window (with printing route) is error "insecure content".
(page must be viewed over SSL to be able to see the problem)
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Print Route "insecure content" problem

Post by Jan »

Hi, the print route link does not include any full link but relative, so the link should get https when enabled :idea:

Jan
If you find Phoca extensions useful, please support the project
lukasz
Phoca Member
Phoca Member
Posts: 13
Joined: 14 Feb 2013, 17:24

Re: Print Route "insecure content" problem

Post by lukasz »

If I allow browser to load unprotected content in the page source I see this:

Code: Select all

<script src="http://www.google.com/jsapi" type="text/javascript"></script>
Enable SSL API Load is set to Yes.

Hmm, maybe I will be able to go deeper into the code of Phoca Maps after this weekend...
Interesting problem :)

Sorry for the delay in response, but spam protection effectively blocked me :)
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Print Route "insecure content" problem

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
lukasz
Phoca Member
Phoca Member
Posts: 13
Joined: 14 Feb 2013, 17:24

Re: Print Route "insecure content" problem

Post by lukasz »

Ok, I fixed it :)
https://github.com/lszeremeta/Phoca-Map ... dfcf9f83ef

My complex tests shows that it works now as it should.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Print Route "insecure content" problem

Post by Jan »

Hi, thank you very much, I will set it for the next version.

Thank you, Jan
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Print Route "insecure content" problem

Post by Jan »

Hi, set in version 3.0.3

Thank you, Jan
If you find Phoca extensions useful, please support the project
Post Reply