Mixed Content Error

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
8 years ago
Hello,

I have enabled and installed SSL on the store. However, on the SSL page I now get mixed content errors. For example on the shopping cart, the images are not being rendered over ssl. The image path is fully qualified -  

Mixed Content: The page at 'https://www.examplestore.com/cart' was loaded over HTTPS, but requested an insecure image 'http://www.examplestore.com/content/images/default-image.png'. This content should also be served over HTTPS.

Please let me know the best way to solve this problem.

Your help is appreciated.

Thank you.
7 years ago
Try the following:
1. Prescribe «Store URL» in the «Edit store details» page through HTTPS
2. Check the selected «SSL enabled» field on the «Edit store details» page
3. Check the selected «Force SSL for all site pages» field in the «Security settings» tab on the «General and miscellaneous settings» page
7 years ago
I am getting this issue with my site. I have a redirect in my web.config file, Force SSL for all site pages checked, and I have set my store values to https://.  If I set "SSL enabled", I get a redirect error.
7 years ago
1. Make sure your images are not hard coding the Url in the HTML.

2. Clear cache in Admin
7 years ago
My guess is the same as Orion...
I think maybe in your /Views/Shared/Header.cshtml you have the non-secure URL hard-coded:

maybe like this:
    var logoPath = "http://www.yourdomain.com/Themes/" + currentThemeName + "/Content/images/logo.gif";


...it should be like this in order to inherit the secure protocol:

    var logoPath = "~/Themes/" + currentThemeName + "/Content/images/logo.gif";
7 years ago
It is pretty frustrating. I even deleted everything, installed a clean copy of NOP, and it still tries to load mixed content. All of the file references are relative.

Mixed Content: The page at 'https://www.fiasfreshmeals.com/' was loaded over HTTPS, but requested an insecure image 'http://www.fiasfreshmeals.com/content/images/thumbs/0000005_electronics_450.jpeg'. This content should also be served over HTTPS.

Where is the URL set? If I set SslEnabled in the store table, I get a redirect error.
7 years ago
I don't know if this is your problem, but after we switched to "ForceSSLforallsitepages" we had some mixed content errors due to some hard-coded image references in our topic page's content, blog post content, and within the large description fields of some of our products that had to be fixed to be relative.
6 years ago
Are you hosting your store behind the proxy? In this case I'd recommend following:
- pass a header X-Forwarded-Proto from your proxy
- uncomment <add key="Use_HTTP_X_FORWARDED_PROTO" value="true" /> line in Web.config so nopCommerce could use this header to identify protocol used
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.