Posted by iAugur on October 28, 2012 at 4:15pm
10 followers
Jump to:
| Project: | Commerce Kickstart |
| Version: | 7.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
There is a minor bug in the Cloud Zoom JQuery plugin used to zoom into product images on the product page.
The plugin uses a div to trap mouse movement. So that it works in IE, the code puts a background image on the div. But it points to a dummy URL url(.) which results in 404 missing page errors filling up the log.
You can simply replace the code for the mousetrap div:
$mouseTrap = jWin.parent().append(format("<div class='mousetrap' style='background-image:url(\".\");
z-index:999;position:absolute;width:%0px;height:%1px;left:%2px;top:%3px;\'></div>",
sImg.outerWidth(), sImg.outerHeight(), 0, 0)).find(':last');with
$mouseTrap = jWin.parent().append(format("<div class='mousetrap' style='background-image:url(\"%0\");
z-index:999;position:absolute;width:%1px;height:%2px;left:%3px;top:%4px;\'></div>",
'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7',
sImg.outerWidth(),sImg.outerHeight(),0,0)).find(':last');This simply puts an inline base64 encoded 1x1 transpatent gif as the background and resolves the issue.
I have written some more about this here: http://technology.blue-bag.com/commerce-detective-cloud-zoom-jquery-plug...
Hope that helps.
Comments
#1
would be good to get this into Kickstart as this can easily fill the error log over time and makes it harder to spot real issues.
#2
I think this got fixed with the Cloud Zoom update.
Please test the latest -dev (or 2.0, we're tagging it in a few hours).
#3
bojanz,
I don't understand exactly what you meant by:
because it seems obviously there are going to be some licensing issues, since 2.x versions of cloud_zoom are paid.
I have tried the trial version, which indeed fixes the problem, but displays a very ugly Unlicensed version message on the image while moving the mouse over zoom area.
I think this should probably be followed up with in #1473594: Mouse trap bakground image produces 404.
I might have missed something with the file download, so I would appreciate if you could correct me if I was wrong, but obviously, purchasing the Cloud Zoom license to fix this issue is probably not going to work for everyone.
Thanks again very much for your comments and help on this.
Cheers!
#4
The latest dev release of Kickstart (7.x-2.x-dev) uses the latest dev version (7.x-1.1+1-dev) of the CloudZoom module which uses the latest free version of the JS library (v1.0.3) - available here http://www.professorcloud.com/downloads/cloud-zoom.1.0.3.zip
Both this and the latest v2 releases have been fixed to use a blank image which solves the 404 issue.
I'll mark as fixed.
#5
Hi iAugur,
Thanks again very much for following up with this.
I am running the exact same modules and versions of cloud zoom JS that you mentioned, with caching and JS aggregation enabled.
Unfortunately I'm still getting this issue, could that come from caching and JS aggregation enabled.
Am I the only one to have this problem?
Any help on this would be greatly appreciated.
Thanks again very much in advance.
#6
Automatically closed -- issue fixed for 2 weeks with no activity.
#7
Hi,
This bug is not completely fixed. Please have a look to DYdave's comment #9 in #1473594: Mouse trap bakground image produces 404.
Basically, turning JS aggregation produces 404 errors again.
Regards,
David
#8
We are getting /scanimageurl appended at the end of URL randomly and redirecting to 404 page error and it seems its happening for IE 8 and 9, has anyone encountered similar problem ? cant seem to find the cause of the problem .