Hey Guys,

I'm new to Drupal but very interested in getting this awesome looking module up and running. Everything seems to work except that after uploading an image the preview area doesn't display it and remains gray. (so one can't see what and where they're cropping)

I can move my crop tool around, crop, and the image is cropped and saved. Has anyone come across this before / know a solution? Is there anything I should check?

Much Thanks.

Comments

paradigmshifter’s picture

After reviewing the source code I noticed that the background of the div "image-crop-container" was pointing to the wrong location of where the file should be.... It's pointing to:
http://mywebsite.com/E:\Location\From\Drive\files/filename_43523424.jpg

I assume it should be pointing at:
http://mywebsite.com/files/filename_4352324.jpg
Although the file doesn't exist there, which could be due to the fact of building the wrong URL.

I've encountered this error elsewhere in my app so it may not pertain to this module at all. Does anyone know of a misconfiguration that may be causing this error?

Much Thanks

paradigmshifter’s picture

I found that I had set the "file system" file path incorrectly and changed it to just "files" (Windows IIS system)

The background URL now looks correct. ie:
http://mywebsite.com/files/filename_4352324.jpg

Except the image still doesn't exist in the "files" folder and therefore the doesn't show up. After I crop the image it does get placed into the files folder. Any ideas on why the preview image isn't being placed in the files folder?

Thanks

paradigmshifter’s picture

When running through Google's new Chrome debugger I get the following error:

"Resource interpreted as image but transferred with MIME type text/html. http://www.website.com/files/filename_32332323.jpg"

Possibly contributing to the problem? My javascript experience is minimal at best

yhager’s picture

Title: Preview Img Blank » Preview Image Blank

Thanks for the report!

re #2 - the image is not present in the files folder until it is saved, but it is presented anyway (Drupal interprets the call and returns the correct file) - so it should work just fine.

re #3 - I am not sure this is related, but it definitely looks like a problem. I am a little low on time at the moment, but will fix as soon as I can.

Do you have clean URLs enabled? Can you test with a web server other than IIS?

paradigmshifter’s picture

Title: Preview Image Blank » Preview Img Blank

Thanks for the feedback yhager.

In the content type settings I set the imagefield back to just "image" rather than "image with cropping" and am experiencing the same error and blank preview image. So the problem most likely is in the underlying CCK Imagefield module. (I've also made a post there addressing the issue)
http://drupal.org/node/304105

I don't have clean URLs enabled (difficulties with IIS) and don't currently have access to another web server.

paradigmshifter’s picture

(Skip this post... Was duplicate of below)

paradigmshifter’s picture

I don't have Clean URLS on and that seemed to be the cause of my generic imagefield preview problem. I was able to fix it using the following patch:
http://drupal.org/node/230848

Imagefield Crop still doesn't work but I wanted to bring it to attention since the problem might be related... Drupal v 5, Clean URLs Off.

Cheers & Thanks

yhager’s picture

Status: Active » Needs work

It seems like parts of the patch in the link you gave should be integrated with imagefield_crop - which contains similar code.
I cannot handle this at the moment, but if someone rolls a patch for this, it has better chances to get in.

yhager’s picture

Status: Needs work » Closed (won't fix)

no response for 6+ months.
clean urls are currently required for this module. I am marking this as wontfix.