CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Hosting CiviCRM/CiviEvent on https
Pages: 1 [2]

Author Topic: Hosting CiviCRM/CiviEvent on https  (Read 5112 times)

mcarson

  • I post occasionally
  • **
  • Posts: 110
  • Karma: 5
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.x
  • MySQL version: 5.5
  • PHP version: 5.4.22
Re: Hosting CiviCRM/CiviEvent on https
March 17, 2012, 03:58:46 am
Opened the Social Networking template at "/templates/CRM/common/SocialNetwork.tpl" and changed http:// to https:// on lines 38, 41, 48 and 56.

Now, event info pages have no warnings!  ;D
“Anyone who has never made a mistake has never tried anything new.” - Albert Einstein
"If you are travelling at the speed of light and you turn on your headlights, would they work?" - Unknown

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Hosting CiviCRM/CiviEvent on https
March 17, 2012, 10:43:07 am
Hi,

would be cool if you could test if it works using "//" (skipping https or http) and create an issue with the patch early next week, as we plan to release a new version soon

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

mcarson

  • I post occasionally
  • **
  • Posts: 110
  • Karma: 5
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.x
  • MySQL version: 5.5
  • PHP version: 5.4.22
Re: Hosting CiviCRM/CiviEvent on https
March 18, 2012, 08:44:36 am
xavier,

Changed "/templates/CRM/common/SocialNetwork.tpl" again to test your suggestion removing "https:" from lines 38, 41, 48 and 56. After clearing the caches, it appears to load the social networking resources over https.

Checked the source of the page and can confirm that "//" works.

Created 'bug' in Issue Tracker with patch. :)

(Please check patch as it is my first ever...)
“Anyone who has never made a mistake has never tried anything new.” - Albert Einstein
"If you are travelling at the speed of light and you turn on your headlights, would they work?" - Unknown

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Hosting CiviCRM/CiviEvent on https
March 18, 2012, 11:57:34 am
Hi,

Could you give the link to the issue (for future references if someone else bump into this thread, for fame & posterity and because I'm that lazy ;) ?

Thanks for the patch!

X+

-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

mcarson

  • I post occasionally
  • **
  • Posts: 110
  • Karma: 5
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.x
  • MySQL version: 5.5
  • PHP version: 5.4.22
Re: Hosting CiviCRM/CiviEvent on https
March 19, 2012, 01:07:35 am
As requested, the link to the issue:

http://issues.civicrm.org/jira/browse/CRM-9886

Will post back with the link/patch for the Google.tpl
“Anyone who has never made a mistake has never tried anything new.” - Albert Einstein
"If you are travelling at the speed of light and you turn on your headlights, would they work?" - Unknown

christopherleslie

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 1
  • Learning the ropes, one pulled hair at a time :)
    • Midwest Renewable Energy Association
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 6.25
  • MySQL version: 5.1.52
  • PHP version: 5.2.15
Re: Hosting CiviCRM/CiviEvent on https
March 19, 2012, 06:48:08 am
Quote from: mcarson on March 17, 2012, 02:41:04 am

Noticed something else though:

On an Event Info page, the social networking links to Twitter and Facebook are referencing http links and not https. This produces the usual errors in FF, IE and Chrome re: unsecure content. I am currently looking to see if I can correct this.

I came across this exact same problem and posted a solution for future reference.

christopherleslie

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 1
  • Learning the ropes, one pulled hair at a time :)
    • Midwest Renewable Energy Association
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 6.25
  • MySQL version: 5.1.52
  • PHP version: 5.2.15
Re: Hosting CiviCRM/CiviEvent on https
March 19, 2012, 06:56:24 am
Since a few of us are looking into this SSL stuff with CiviCRM, I have another issue that's related. My browser's kept telling me that my CiviCRM site was insecure, and after resolving BOTH the social network issues and the Google Maps problem, everything's weeded out except for one thing.

CiviCRM is making insecure calls to a few more things. It does so on ALL of my CiviCRM pages, especially donation & membership signups (which will likely scare the bejeebus out of potential donors if they see it). What's very strange is that Internet Explorer doesn't seem to have any issues with these insecure calls, but Google Chrome does.

Here's a readout of Chrome's Console section. You can use this to identify EXACTLY what insecure content is being loaded. Follow this link for directions.

My readout:

Quote
The page at https://www.midwestrenew.org/civicrm/contribute/transact?reset=1&id=6 ran insecure content from http://midwestrenew.org/sites/all/modules/civicrm/packages/tinymce/jscripts/tiny_mce/jquery.tinymce.js.

The page at https://www.midwestrenew.org/civicrm/contribute/transact?reset=1&id=6 ran insecure content from http://midwestrenew.org/sites/all/modules/civicrm/packages/tinymce/jscripts/tiny_mce/tiny_mce.js.

The page at https://www.midwestrenew.org/civicrm/contribute/transact?reset=1&id=6 displayed insecure content from http://midwestrenew.org/sites/all/modules/civicrm/packages/jquery/css/images/arrow.png.

The page at https://www.midwestrenew.org/civicrm/contribute/transact?reset=1&id=6 displayed insecure content from http://midwestrenew.org/sites/all/modules/civicrm/i/mini_cvv2.gif.

Even though my .htaccess forces these calls to load as "https", the module is performing calls to "http". Changing the editor to CKEditor yields the same issue, changing it to plain text makes it go away (but let's be honest, that is not a fix). As far as the Arrow and mini_cvv2 images....not sure why that is.

I'm going to download a copy of my module and try to figure out where these calls are being made from, if any CiviCRM devs out there want to give it a go that'd be great.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Hosting CiviCRM/CiviEvent on https
March 19, 2012, 09:36:08 am
Hi,

(not using ssl for that)

If you find in the code the places where it's included and replace the "http://" by "//" it should work.

This being said, not sure why it's including tinymce, do you have custom fields? What's your CMS configuration?

I'm assuming you have configured civi to use SSL?

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

christopherleslie

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 1
  • Learning the ropes, one pulled hair at a time :)
    • Midwest Renewable Energy Association
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 6.25
  • MySQL version: 5.1.52
  • PHP version: 5.2.15
Re: Hosting CiviCRM/CiviEvent on https
March 19, 2012, 12:39:38 pm
Quote from: xavier on March 19, 2012, 09:36:08 am
Hi,
If you find in the code the places where it's included and replace the "http://" by "//" it should work.

This being said, not sure why it's including tinymce, do you have custom fields? What's your CMS configuration?

I'm assuming you have configured civi to use SSL?

X+

Yes I do have custom fields.

My CMS configuration? I'm running 4.1.1 on Drupal 6.25.

I configured Civi to "Force Secure URLs" (set to Yes), and my Resource URLs all point to https.

christopherleslie

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 1
  • Learning the ropes, one pulled hair at a time :)
    • Midwest Renewable Energy Association
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 6.25
  • MySQL version: 5.1.52
  • PHP version: 5.2.15
Re: Hosting CiviCRM/CiviEvent on https
March 19, 2012, 01:14:44 pm
Okay, mark this one as solved...for now.

This is a temporary (NOT IDEAL) fix, but editing the .tpl files did the trick. The 3 files I had to edit were drupal6.tpl, Navigation.tpl, and BillingBlock.tpl. I replaced the calls to {$config->resourceBase} with a direct path using https.

Basically, doing searches of the offending files led me to the scripts that they're contained in. Not too particularly hard.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Hosting CiviCRM/CiviEvent on https
March 19, 2012, 03:58:59 pm
I'm confused. You are having https://example.org/... as your resourceBase AND you still have http://links?

Would be good you find the cause and submit a patch, so you won't have to do the patch manually at each upgrade and could solve the pb for others as well.

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

christopherleslie

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 1
  • Learning the ropes, one pulled hair at a time :)
    • Midwest Renewable Energy Association
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 6.25
  • MySQL version: 5.1.52
  • PHP version: 5.2.15
Re: Hosting CiviCRM/CiviEvent on https
March 19, 2012, 06:52:29 pm
Quote from: xavier on March 19, 2012, 03:58:59 pm
I'm confused. You are having https://example.org/... as your resourceBase AND you still have http://links?

That's 100% correct. I'm just as confused as to why it's still calling to http. I specified CiviCRM to use https, my .htaccess file forces all visitors to use the ssl version of the site, and still...no good.
Quote
Would be good you find the cause and submit a patch, so you won't have to do the patch manually at each upgrade and could solve the pb for others as well.

X+

I'd love to if I could figure out the cause.

mcarson

  • I post occasionally
  • **
  • Posts: 110
  • Karma: 5
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.x
  • MySQL version: 5.5
  • PHP version: 5.4.22
Re: Hosting CiviCRM/CiviEvent on https
March 20, 2012, 12:47:08 am
christopherleslie,

I have checked my install for similar offending scripts and cannot find any.
Looking at your error below may indicate SSL certificate issues;

Quote
The page at https://www.midwestrenew.org/civicrm/contribute/transact?reset=1&id=6 ran insecure content from http://midwestrenew.org/sites/all/modules/civicrm/packages/tinymce/jscripts/tiny_mce/jquery.tinymce.js.

Let me explain (you probably know this already);
Standard SSL certificates are valid for only one site: subdomain.domain.tld OR domain.tld. Therefore a www subdomain would need a separate SSL certificate to domain.tld. The error above occurs as a result of a script executed at subdomain.domain.tld referencing resources/content outside of SSL at domain.tld.
A quick look at your site indicates that redirects are working (or should work) from non-SSL /non-www requests (and vice-versa).
Could you look at your civicrm.setting.php file and check if the following works?

Code: [Select]
define( 'CIVICRM_UF_BASEURL'      , 'https://www.midwestrenew.org/' );

I have also had problems with users linking images located external to https inside the WYSIWYG editors - causing all sorts of insecure warnings...
“Anyone who has never made a mistake has never tried anything new.” - Albert Einstein
"If you are travelling at the speed of light and you turn on your headlights, would they work?" - Unknown

christopherleslie

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 1
  • Learning the ropes, one pulled hair at a time :)
    • Midwest Renewable Energy Association
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 6.25
  • MySQL version: 5.1.52
  • PHP version: 5.2.15
Re: Hosting CiviCRM/CiviEvent on https
March 20, 2012, 06:24:07 am
Quote from: mcarson on March 20, 2012, 12:47:08 am
christopherleslie,
Could you look at your civicrm.setting.php file and check if the following works?

Code: [Select]
define( 'CIVICRM_UF_BASEURL'      , 'https://www.midwestrenew.org/' );

I have also had problems with users linking images located external to https inside the WYSIWYG editors - causing all sorts of insecure warnings...

That did the trick. Everything works 100% now. THANK YOU!!!!

The likely reason why I never noticed that was because someone else created the initial civicrm.settings.php file 2 years ago, and we were on an earlier version of CiviCRM at that point.

Allllllllrighty then. Problem solved. I'm going to go back and revert those .tpl files.

Pages: 1 [2]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Hosting CiviCRM/CiviEvent on https

This forum was archived on 2017-11-26.