Buy Now
Sign in

SSL + Chronoforms

Vipz , January 28 2016
V
Vipz
Hello , I have problem with SSL on the page with the form.

"Mixed Content: The page at 'https://site.ru/page10' was loaded over a secure connection, but contains a form which targets an insecure endpoint 'http://site.ru/page10?chronoform=my_form&event=submit'. This endpoint should be made available over a secure connection."

How to solve it ?
GreyHead
Hi Vipz,

Please check the livesite setting in the site configuration file - that should be empty,

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
V
Vipz
it is empty

configuration.php

public $live_site = '';
V
Vipz
can you suggest something else ?
GreyHead
Hi Vipz,

Check where the URL is coming from - it's an SEF URL not one created by ChronoForms. Do you have a Menu item with a fixed URL set?

If you can't find the source then you can try setting Relative URL to No in the HTML (Render Form) action.

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
V
Vipz
Thx for Relative URL to No
D
dnigra
Chronoforms5
Joomla 2.5.7

I am seeing a similar problem.

For example: https://www.psc.edu/index.php?option=com_chronoforms5&chronoform=PSCFeedback

shows many errors in the Inspector like:

index.php?option=com_chronoforms5&chronoform=PSCFeedback:73 Mixed Content: The page at 'https://www.psc.edu/index.php?option=com_chronoforms5&chronoform=PSCFeedback' was loaded over HTTPS, but requested an insecure stylesheet 'http://www.psc.edu/libraries/cegcore/assets/gplugins/gmodal/gmodal.css'. This request has been blocked; the content must be served over HTTPS.


I did check Relative URL to No and checked that $live_site was empty.

Where should I look next? Thanks.
GreyHead
Hi dnigra,

I don't know. As far as I can see ChronoForms doesn't set a URL root anywhere - it tries to use the current site URL.

Just as an experiment what happens if you set $livesite to https://www.psc.edu ?

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
R
rvalitov
I have the same problem. It's an old problem of ChronoForms that was discussed long ago, but still no official patch is applied. The problem is in the cegcore library that is shipped with the ChronoForms install package. To fix this you should modify a function called "domain" the /libraries/cegcore/libs/url.php file by replacing the function to the following code:


public static function domain() {
   if ( (!empty($_SERVER['HTTPS']) AND $_SERVER['HTTPS'] !== 'off')
     OR $_SERVER['SERVER_PORT'] == 443 ) {
    $dURL = 'https://';
   } else {
    $dURL = 'http://';
   }

   if ( !empty($_SERVER['HTTP_HOST']) ) {
    $dURL .= $_SERVER['HTTP_HOST'];
   } else {
    $dURL .= $_SERVER['SERVER_NAME'];
   }

   if ( $_SERVER['SERVER_PORT'] != '80' AND $_SERVER['SERVER_PORT'] != '443') {
    if ( strpos($dURL, ':'.$_SERVER['SERVER_PORT']) === false ) {
     $dURL .= ':'.$_SERVER['SERVER_PORT'];
    }
   }
   return $dURL;
  }
B
bobysha
Thank you all for these solutions! All these tips are really helpful and they work. I had the same problem with SSL and now it is solved