• Resolved Dan & Jennifer

    (@danstuff)


    There have been several posts on this issue, in this forum and others, with no resolution from the developer that I could find. Same with direct support tickets opened so far, as the one I opened yesterday. 🙂

    Sharing this for others who run into this problem – and for the developer to hopefully fix in the code so we don’t have to update the code on every plugin update.

    Problem summary: anyone running EasyAzon on an https / SSL site is getting browser “mixed content” security errors. Basically the SSL site ends up showing security errors on all pages that use EasyAzon info blocks.

    More and more sites are moving to SSL daily – it’s encouraged by Google and inspires visitor confidence/trust.

    This is a very nice plugin, and having a well-configured SSL site start showing browser mixed-content security issues to visitors is a problem. Tho thankfully a very easy to solve problem.

    Root cause: The problem is caused by the image embedded from Amazon being straight http rather than being protocol relative – or just straight https (SSL).

    The way browsers work, an SSL page cannot call non-secure http resources – browsers bring up warnings for that and disturb the visitor experience.

    Fix: The solution is very simple – translate that image URL into the SSL image URL. That will work on all sites, including regular http sites and SSL sites.

    Amazon thankfully provides a simple SSL version of the image URLs.

    So this http-only image URL:
    http://ecx.images-amazon.com/images/I/4162YoDIBIL._SL160_.jpg

    Can be replaced with this SSL image URL (which works on any site):
    https://images-na.ssl-images-amazon.com/images/I/4162YoDIBIL._SL160_.jpg

    Found the problem in the code and fixed it. Here’s the solution:

    Edit this file: wp-content > plugins > EasyAzon Pro directory > components > shortcodes > info-block > info-block.php

    See line 81

    Replace this line:
    ‘src’ => $item[‘images’][$image_index][‘url’],

    With these lines:
    //
    // fix for SSL mixed-content error – always use Amazon SSL image URLs
    //’src’ => $item[‘images’][$image_index][‘url’],
    ‘src’ => str_replace(“http://ecx.images-amazon.com/”,”https://images-na.ssl-images-amazon.com/”, $item[‘images’][$image_index][‘url’] ),
    //

The topic ‘EasyAzon SSL problem – browser security errors on SSL sites (solution included)’ is closed to new replies.