-
AuthorPosts
-
arucardx Friend
arucardx
- Join date:
- July 2010
- Posts:
- 346
- Downloads:
- 0
- Uploads:
- 10
- Thanks:
- 21
- Thanked:
- 138 times in 104 posts
October 31, 2012 at 8:20 am #181841While 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 ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
November 1, 2012 at 7:27 am #471657Hi 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.
1 user says Thank You to Saguaros for this useful post
arucardx Friendarucardx
- Join date:
- July 2010
- Posts:
- 346
- Downloads:
- 0
- Uploads:
- 10
- Thanks:
- 21
- Thanked:
- 138 times in 104 posts
November 2, 2012 at 2:51 am #471713Thanks for raising the bug report. I’ll look forward to the fix then.
Wall Crasher DeveloperWall Crasher
- Join date:
- December 2011
- Posts:
- 1113
- Downloads:
- 0
- Uploads:
- 15
- Thanks:
- 66
- Thanked:
- 361 times in 300 posts
December 12, 2012 at 9:44 am #475962Hi 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 Friendarucardx
- Join date:
- July 2010
- Posts:
- 346
- Downloads:
- 0
- Uploads:
- 10
- Thanks:
- 21
- Thanked:
- 138 times in 104 posts
December 13, 2012 at 2:55 am #476056Hi 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 DeveloperWall Crasher
- Join date:
- December 2011
- Posts:
- 1113
- Downloads:
- 0
- Uploads:
- 15
- Thanks:
- 66
- Thanked:
- 361 times in 300 posts
December 13, 2012 at 5:04 am #476079Hi 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
-
AuthorPosts
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