Question

If I activate SSL and then on checkout I got error for prototype!

Block loading mixed active content

Was it helpful?

Solution

This is happening because scripts are being loaded in your theme via HTTP only. Scripts downloaded via HTTP cannot be executed via HTTPS. You should load your scripts using the protocol-agnostic method:

Instead of:

<script src="http://mysite.com/js/somefile.js"></script>

Use this:

<script src="//mysite.com/js/somefile.js"></script>

I doubt this is happening with Prototype.js as Magento should be loading this the correct way. However, if that is the case, your custom package/theme may be loading scripts incorrectly. Read some tutorials on how to set these up to append to the <head> via Layout XML.

Here are a few links:

http://www.magentogarden.com/blog/javascript-error-install-your-magento-extensions-properly.html

https://stackoverflow.com/questions/8875662/how-to-change-the-prototype-js-url-to-a-google-hosted-version

OTHER TIPS

I know this is a little old but just in case that somebody needs this... If you're using getUrl and this url must be secure, you need to pass it this as a parameter

array("_secure"=>true)

Mage::getUrl('', array("_secure"=>true));

I don't know if there's a easy way without changing all your getUrl but this works.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top