Closed (fixed)
Project:
Image javascript crop
Version:
6.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
17 Aug 2009 at 16:52 UTC
Updated:
12 Mar 2010 at 00:40 UTC
When I go to crop an image, I get a solid gray area where the image is. I can't see any of the image at all. I get the box for dragging but can't see the image to know where I'm at.
Comments
Comment #1
lindsayo commentedSorry, I guess I should have said I'm using this with Imagefield.
Comment #2
FoodooChild commentedI get the same problem with version 5.x-1.3. I've tried it in IE 7 and FireFox 3.013.
I've also tried it with and without thickbox enabled. They all have slightly different behaviours but the end result is that you see a grey box instead of the image.
I tried the imagefield_crop module before this and had a simialr problem.
Note: I have clean urls turned off so I modified the module file to look for the image with &time= instead of ?time= .
Comment #3
FoodooChild commentedOK, this is what I've managed to figure out:
I have clean urls disabled. There are two lines in the module file where it displays image files; one that displays the cropped result and one that displays the original with the crop tool overlayed on it. They are made so that the src part of the img tag finishes with ?time=125783534 or whatever the current time is. I presume this is to avoid browsers caching and displaying old versions of the image. But if you have clean urls disabled, this causes the image to be broken because it results in the src url having two query strings.
So I changed both lines to &time= instead. This somehow caused the grey box problem.
I can't explain why but it works if I keep the first img tag as it was but change the second one to &time= .
So in conclusion, if you have this problem and you have clean urls disabled and you thought you could fix the broken images by changing your ?s to &s then you can fix it by:
1. keeping line 320 as: $url = file_create_url($file->dst) .'?time='. time();
2. but changing line 601 to: return '
';
*note: I'm using version 5.1 so your line numbers may not be identical.
Comment #4
mrfelton commentedThis should be fixed in CVS:
http://drupalcode.org/viewvc/drupal/contributions/modules/imagecrop/imag...
ps. this is fixed in the Drupal 6 version and I will not be support the Drupal 5 version of the module. Please feel free to submit a patch against that version!