test
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • arucardx Friend
    #181841

    While testing SSL today, I notice that lazyload doesn’t support SSL as it returns http:// for the images url. Causing a partially encrypted problem.

    For example

    <div class="item-image">
    <a class="item-link" href="/category/blahblah-link-to-article">
    <img class="lazyload" src="http://mydomain.com/cache/jalazyload/900x506.png" longdesc="http://mydomain.com/media/k2/items/cache/imagehash_XL.jpg" />
    <span> </span>
    </a>
    </div>

    To fix that problem, I modified the code for lazyload a little. (Need developer to confirm if the fix is correct)

    In jalazyload.php line 141, I changed this line from

    $r[0] = 'class="'.$cls.'" src="'.$img_data.'" longdesc="'.$src.'"';
    To
    $r[0] = 'class="'.$cls.'" src="'.$img_data.'" longdesc="'.$orgSrc.'"';

    line 205 from

    $img_src = JURI::base().'cache/jalazyload/'.$fileName;
    To
    $img_src = '/cache/jalazyload/'.$fileName;

    line 227 from

    $img_src = JURI::base().'cache/jalazyload/'.$fileName;
    To
    $img_src = '/cache/jalazyload/'.$fileName;

    So now the html code for the images output looks like this

    <div class="item-image">
    <a class="item-link" href="/category/blahblah-link-to-article">
    <img class="lazyload" src="/cache/jalazyload/900x506.png" longdesc="/media/k2/items/cache/imagehash_XL.jpg" />
    <span> </span>
    </a>
    </div>

    That solves the HTTPS partially encrypted issue but then I’m not sure if that is the right fix for lazyload. Especially when $src is used to check if the image is external.

    Saguaros Moderator
    #471657

    Hi arucardx,

    I raised it on our bug tracking system. Please follow this link http://pm.joomlart.com/browse/JATCWALLJ25-474 to get updated.

    We will check and fix issue soon. Thanks so much for reporting.

    arucardx Friend
    #471713

    Thanks for raising the bug report. I’ll look forward to the fix then.

    Wall Crasher Developer
    #475962

    Hi arucardx,

    I do not know why JURI::base() returns ‘http’ in for a https url.

    I did on our server and all images are returned correctly with data-original=”https://….” and the lazyload works well.

    It would be terrific if you provide the problem context for me to invest the problem.

    I think the error should come from external image link, but it looks like that you are using internal link and pls describe steps by steps to reproduce this issue.

    I am waiting for your information.

    Regards

    arucardx Friend
    #476056

    Hi Wall Crasher,

    While troubleshooting another problem, I realize the reason why JURI::base() returns http is because a value was set for “live_site” in configurations.php.

    Once the live_site value was removed, JURI::base() correctly returns https if the url is a https.

    Wall Crasher Developer
    #476079

    Hi arucardx,

    Yes, you are right.
    I think it would be better to remove the live_site and let Joomla auto detect the url,

    http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=23907
    I also wonder why Joomla does not fix this issue. It was raised a long time ago.

    http://docs.joomla.org/Why_does_your_site_get_messed_up_when_you_turn_on_SEF_%28Search_Engine_Friendly_URLs%29%3F
    I think they suggest to use blank value. :laugh:

    Regards

Viewing 6 posts - 1 through 6 (of 6 total)

This topic contains 6 replies, has 3 voices, and was last updated by  Wall Crasher 11 years, 11 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum