Zoom image issue with HTTPS
Permalink
My website has many zoom images on pages. All works perfectly until you load the page HTTPS instead of HTTP.
In HTTPS the zoom images show zoomed when the page is loaded. The small image can still be clicked but the image zoomed is already shown.
Why does it do this, how do I get the images to not load zoomed in?
In HTTPS the zoom images show zoomed when the page is loaded. The small image can still be clicked but the image zoomed is already shown.
Why does it do this, how do I get the images to not load zoomed in?
You can replace this line:
https://github.com/Remo/concrete5-zoom-image/blob/master/blocks/zoom...
with this:
https://github.com/Remo/concrete5-zoom-image/blob/master/blocks/zoom...
with this:
$v->addHeaderItem('<script type="text/javascript" src="' . DIR_REL . '/packages/zoom_image/blocks/zoom_image/fancyzoom.min.js"></script>', 'CONTROLLER');
I created a change request for the corehttps://github.com/concrete5/concrete5/pull/1391...
Thank you for your support.
Unfortunately,
It did not work in firefox or chrome.
This is the js error:
Uncaught TypeError: Object #<Object> has no method 'fancyZoom'
Any ideas?
Unfortunately,
It did not work in firefox or chrome.
This is the js error:
Uncaught TypeError: Object #<Object> has no method 'fancyZoom'
Any ideas?
That's exactly the message I get if I don't apply the patch I've mentioned. Can you please post a link to your site?
Here is a link with https to one of our product pages with the issue.
https://www.grandstream.com/index.php/products/ip-voice-telephony/en...
In chrome it shows the images zoomed but in IE it shows correctly.
(I made the change you advised)
Thanks
https://www.grandstream.com/index.php/products/ip-voice-telephony/en...
In chrome it shows the images zoomed but in IE it shows correctly.
(I made the change you advised)
Thanks
In your output, there's still this line:
That's the output of the old code before the patch!
Can you please check if you really modified that line - you have to remove the existing line! It might also be possible, that you've overwritten the existing controller, please check all files.
You'll probably also have to replace the second line in the controller but that's definitely not the cause of the problem you currently see!
As an alternative, you can also apply this patch:https://github.com/concrete5/concrete5/pull/1391/files... but take care, your file might look a bit different since you're using a pretty old version of concrete5.
<script type="text/javascript" src="http://www.grandstream.com/packages/zoom_image/blocks/zoom_image/fancyzoom.min.js"></script>
That's the output of the old code before the patch!
Can you please check if you really modified that line - you have to remove the existing line! It might also be possible, that you've overwritten the existing controller, please check all files.
You'll probably also have to replace the second line in the controller but that's definitely not the cause of the problem you currently see!
$v->addHeaderItem('<script type="text/javascript" src="' . DIR_REL . '/packages/zoom_image/blocks/zoom_image/fancyzoom.min.js"></script>', 'CONTROLLER'); $v->addHeaderItem('<script type="text/javascript">$(document).ready(function() { $("a.zoomImage").fancyZoom({scaleImg: true, closeOnClick: true, directory:"' . DIR_REL . '/packages/zoom_image/blocks/images"}); });</script>', 'CONTROLLER');
As an alternative, you can also apply this patch:https://github.com/concrete5/concrete5/pull/1391/files... but take care, your file might look a bit different since you're using a pretty old version of concrete5.
That worked perfectly. I did have to edit the path of the close() image.
$v->addHeaderItem('<script type="text/javascript" src="' . DIR_REL . '/packages/zoom_image/blocks/zoom_image/fancyzoom.min.js"></script>', 'CONTROLLER');
$v->addHeaderItem('<script type="text/javascript">$(document).ready(function() { $("a.zoomImage").fancyZoom({scaleImg: true, closeOnClick: true, directory:"' . DIR_REL . '/packages/zoom_image/blocks/zoom_image/images"}); });</script>', 'CONTROLLER');
Thank you!
$v->addHeaderItem('<script type="text/javascript" src="' . DIR_REL . '/packages/zoom_image/blocks/zoom_image/fancyzoom.min.js"></script>', 'CONTROLLER');
$v->addHeaderItem('<script type="text/javascript">$(document).ready(function() { $("a.zoomImage").fancyZoom({scaleImg: true, closeOnClick: true, directory:"' . DIR_REL . '/packages/zoom_image/blocks/zoom_image/images"}); });</script>', 'CONTROLLER');
Thank you!
I could work around that but I feel like we should improve that part in the core.