Post by daza2304 » Thu Apr 14, 2011 12:34 am

Hi all i need a little help, Everything works fine in http mode. But when I turn on SSL. The Region/State dropdown is empty, I am unable to select a state while creating account. This also affect shipping and address fields.

im using the latest version of OC

Attachments

default_theme.JPG

default_theme.JPG (77.32 KiB) Viewed 4164 times


New member

Posts

Joined
Sun May 24, 2009 9:54 pm

Post by Avvici » Thu Apr 14, 2011 2:25 pm

You should focus on fixing your SSL. The fact that you only have partial encryption needs to be addressed. Many topics around in solving this. Just run a search. I'ts not going to be an OC issue but rather your Certificate.

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by daza2304 » Thu Apr 14, 2011 3:23 pm

Hi i thought that too, i was on the phone for over 1 hour yesterday to the hosting company, they assured me the SSL was setup correctly,im not sure where to go from here, is there anything i can do from the backend to sort out the secure images?, maybe if i get that fixed the rest will work.

New member

Posts

Joined
Sun May 24, 2009 9:54 pm

Post by daza2304 » Thu Apr 14, 2011 4:23 pm

ok i had another email from the hosting company, they said this


"This is an issue with your shopping cart css or theme - if you are loading images using an absolute URL with http://, when viewing over https:// this will generate the error that not all items on the page are secure. You should ideally load images, css, js via a relative reference so that when accessing over http:// they load over http, and when loading over https they load over https."

You can see this clearly if you visit https://www.rage-systems.co.uk/testpage.html - there are no errors because no external items are loaded over http."

New member

Posts

Joined
Sun May 24, 2009 9:54 pm

Post by Moggin » Thu Apr 14, 2011 7:27 pm

Hi daza3204 - regardless of the problem with region/country dropdown, there is an unusual problem with the secured pages.

When you switch on SSL, that should automatically secure login/checkout etc. The base href of the page should be https: (view source code to see this) - this secures the content on the page.

However, your base href for secure pages is http:, and so none of your content is secured. I may be wrong, but do not think it is an issue with loading absolute paths for images. Opencart doesn't function that way.

Your SSL cert is installed correctly, so that isn't the problem. I can see you're testing the default template too, but the error still shows.

The problem looks similar to the one on this thread so it might be worth another word with your host.
Last edited by Moggin on Thu Apr 14, 2011 7:49 pm, edited 1 time in total.

Active Member

Posts

Joined
Wed May 05, 2010 4:56 am

Post by daza2304 » Thu Apr 14, 2011 7:33 pm

ok i just emailed them your reply, see what happens, so its deffo host related?

New member

Posts

Joined
Sun May 24, 2009 9:54 pm

Post by Moggin » Thu Apr 14, 2011 7:52 pm

No I wouldn't go that far, but it's worth checking. One or two hosts have unusual server setups which play havoc with SSL - see Xsecrets posting here
http://forum.opencart.com/viewtopic.php ... t=0#p95552

Active Member

Posts

Joined
Wed May 05, 2010 4:56 am

Post by daza2304 » Thu Apr 14, 2011 8:21 pm

ok they are getting some where now, they asked me to post this in here

"Can you ask them on the forum where the SSL detection code resides?"

if i do get a fix i will post back on the forum and let others know.

Thanks

New member

Posts

Joined
Sun May 24, 2009 9:54 pm

Post by Avvici » Thu Apr 14, 2011 9:43 pm

Open Cart calls the https:// on certain pages as I am sure you know by now. On those pages make sure that all of your URL's are relative and not absolute. If you have added anything. For example always reference your content relatively like /images/icons/test.jpg and not http://www.yourdoman.com/images/icons/test.jpg

Also if you have added any external references those can conflict with your SSL as well and make it a partial encryption. Just throwing this your way.

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by Moggin » Fri Apr 15, 2011 1:55 am

...totally correct. I just checked back and the only thing I can see now is a minor error, the rapidssl_ssl.gif which is loading over http:

Base href is now https: on secure pages, so it's looking good..

Active Member

Posts

Joined
Wed May 05, 2010 4:56 am

Post by Avvici » Fri Apr 15, 2011 2:04 am

Moggin wrote:...totally correct. I just checked back and the only thing I can see now is a minor error, the rapidssl_ssl.gif which is loading over http:

Base href is now https: on secure pages, so it's looking good..
Again, the system takes care of the redirect from http to https. All of your url's that are present on pages where https is loaded need to be relative. Nowhere in your entire open cart template system should there be any mention of https

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by daza2304 » Fri Apr 15, 2011 2:07 am

yes its all sorted now i had to edit catalog/controller/common/header.php with this code

Code: Select all

$this->request->server['HTTPS'] 
to

Code: Select all

$this->request->server['HTTP_X_FORWARDED_PROTO'] 
now ssl works great :) thanks to Xsecrets, he helped alot.

New member

Posts

Joined
Sun May 24, 2009 9:54 pm

Post by Moggin » Fri Apr 15, 2011 2:26 am

@daza2304 oh excellent! Kudos to Xsecrets. Thank you for letting us know the fix. :)

@avicci, correct, https shouldn't be anywhere in the template system; I understand the point. :) Most minor SSL problems do indeed come from hard-coding absolute URLs, or from external scripts.

Here, I was looking at the dynamically generated source code on the site. That must show base href="https when the address bar shows the URL as https, otherwise none of the media will be secured. It's rare, but if it occurs it's more serious than a template error... I've only seen it a couple of times here.

Active Member

Posts

Joined
Wed May 05, 2010 4:56 am

Post by Avvici » Fri Apr 15, 2011 3:01 am

Glad you found the fix

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by johnegg » Wed Jun 20, 2012 2:38 am

Hi daza2304 , Do I replace all instances of $this->request->server['HTTPS'] in header.php with that code? I tried it and I got 26 more unsecure errors!

Newbie

Posts

Joined
Thu Dec 22, 2011 3:03 am

Post by Avvici » Wed Jun 20, 2012 2:47 am

That fix isn't for everyone johnegg. People should be following the default SSL configuration instructions first. If your page is customized in some fasion and you are breaking your SSL then check the page here:
http://www.whynopadlock.com/

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by johnegg » Wed Jun 20, 2012 2:52 am

Thanks avvici. I know where teh errors are coming from (using inspect element in safari) but the thing is the logo image link is coming through as http:// not https://. Its not hard coded, its dynamic but still causing issues. Any ideas? In using multi store functionality too.

Newbie

Posts

Joined
Thu Dec 22, 2011 3:03 am

Post by Brendan00 » Mon Apr 15, 2013 7:34 pm

This issue can occur when you enable your site to work under https and when your hosting provider uses an SSL Reversed Proxy / Load Balanced SSL Proxy. You can check to see if your host is using SSL load balancing / proxy, and if so there is now a vQmod available to fix any issues that you are experiencing:
http://www.opencart.com/index.php?route ... n_id=11280

Newbie

Posts

Joined
Thu Apr 11, 2013 10:56 pm
Who is online

Users browsing this forum: No registered users and 73 guests