cancel
Showing results for 
Search instead for 
Did you mean: 

Mixed content not loaded

Highlighted

Mixed content not loaded

Hello,
I'm trying to understand how does Magento generate its HTTP or HTTPS links:

Mixed Content: The page at '...' was loaded over HTTPS, but requested an insecure stylesheet '.../js/calendar/calendar-win2k-1.css'. This request has been blocked; the content must be served over HTTPS.

I can see /calendar-win2k-1.css in quite a few frontend and admin XML files, but where does it read the host from? The database? In this case, I'm used to Joomla / Drupal / Wordpress plugins doing mass search and replace, but I can't seem to find a Magento equivalent.

Thank you

3 REPLIES 3
Highlighted

Re: Mixed content not loaded

It was due to a missing configuration for the reverse proxy (h2o) I'm using.

Solved by adding to index.php, before everything else:

    $_SERVER['HTTPS'] = 'on';
    $_SERVER['SERVER_PORT'] = 443;

I suppose there are more elegant solutions, but whis worked.

Highlighted

Re: Mixed content not loaded

This error happens when some of your site resources (like images or css/js files) are being loaded through http protocol while your site is using a https ssl certificate. 

Highlighted

Re: Mixed content not loaded

Mixed Content Errors is another possible SSL problem mainly due to the failure to load images or scripts via a secure SSL protocol. 

 

The best strategy to avoid mixed content blocking is to serve all the content as HTTPS instead of HTTP. For your own domain, serve all content as HTTPS and fix your links. Often, the HTTPS version of the content already exists and this just requires adding an "s" to links - http to https.
 
You can activate SSL in Magento with below steps:
  1. Navigate to System > Configuration > General > Web.
  2. Click the Secure tab.
  3. Enable Yes for the option Use Secure URLs in the frontend.
  4. Enable Yes for the option Use Secure URLs in the Admin.
  5. Check the offload header as SSL_OFFLOADED.