Here's the steps to repeat for me:

1. Download the latest 6.x-1.x-dev
2. Create a filefield with "Imagefield with crop" as the widget type
3. Accept the defaults for the field which leaves "Enforce crop box ratio" checked
4. Attempt to upload an image
5. The browser returns:

An HTTP error 0 occurred.
/filefield/ahah/image_asset/field_imagefield/0

If I then hit "Save" on the node it will forward my browser to filefield/ahah/image_asset/field_imagefield/0 and return a Json array like:

{ "status": true, "data": "\x3cdiv id=\"edit-field-imagefield-0-ahah-wrapper\"\x3e\x3cdiv class=\"form-item\" id=\"edit-field-imagefield-0-wrapper\"\x3e\n \x3clabel for=\"edit-field-imagefield-0\"\x3eImage: \x3c/label\x3e\n \x3cdiv class=\"filefield-element clear-block\"\x3e\x3cdiv class=\"widget-preview\"\x3e\x3cdiv class=\"jcrop-preview-wrapper\" style=\"width:200px;height:150px;overflow:hidden;\"\x3e\x3cimg src=\"http://closets/closets/sites/default/files/screenshot_038_6.png.crop_display.jpg\" alt=\"jcrop preview\" title=\"\" class=\"jcrop-preview\" /\x3e\x3c/div\x3e\x3cscript type=\"text/javascript\"\x3ejQuery.extend(Drupal.settings.imagefield_crop, { \"edit-field-imagefield-0\": { \"box\": { \"ratio\": 1.33333333333, \"box_width\": 500, \"box_height\": 500 }, \"minimum\": { \"width\": \"200\", \"height\": \"150\" }, \"preview\": { \"orig_width\": 708, \"orig_height\": 491, \"width\": 200, \"height\": 150 } } });\x3c/script\x3e\x3c/div\x3e\x3cdiv class=\"widget-edit\"\x3e\x3cinput type=\"hidden\" name=\"field_imagefield[0][fid]\" id=\"edit-field-imagefield-0-fid\" value=\"33\" /\x3e\n\x3cinput type=\"hidden\" name=\"field_imagefield[0][data][crop][x]\" id=\"edit-field-imagefield-0-data-crop-x\" value=\"0\" class=\"edit-image-crop-x\" /\x3e\n\x3cinput type=\"hidden\" name=\"field_imagefield[0][data][crop][y]\" id=\"edit-field-imagefield-0-data-crop-y\" value=\"0\" class=\"edit-image-crop-y\" /\x3e\n\x3cinput type=\"hidden\" name=\"field_imagefield[0][data][crop][width]\" id=\"edit-field-imagefield-0-data-crop-width\" value=\"654.666666667\" class=\"edit-image-crop-width\" /\x3e\n\x3cinput type=\"hidden\" name=\"field_imagefield[0][data][crop][height]\" id=\"edit-field-imagefield-0-data-crop-height\" value=\"491\" class=\"edit-image-crop-height\" /\x3e\n\x3cinput type=\"hidden\" name=\"field_imagefield[0][data][crop][changed]\" id=\"edit-field-imagefield-0-data-crop-changed\" value=\"1\" class=\"edit-image-crop-changed\" /\x3e\n\x3cdiv class=\"form-item\" id=\"edit-field-imagefield-0-cropbox-wrapper\"\x3e\n \x3clabel for=\"edit-field-imagefield-0-cropbox\"\x3eCrop area: \x3c/label\x3e\n \x3cimg class=\"cropbox\" id=\"edit-field-imagefield-0-cropbox\" alt=\"\" src=\"http://closets/closets/sites/default/files/screenshot_038_6.png.crop_display.jpg?1273260920\" /\x3e\n\x3c/div\x3e\n\x3cinput type=\"hidden\" name=\"field_imagefield[0][list]\" id=\"edit-field-imagefield-0-list\" value=\"1\" /\x3e\n\x3cinput type=\"submit\" name=\"field_imagefield_0_filefield_remove\" id=\"edit-field-imagefield-0-filefield-remove\" value=\"Remove\" class=\"form-submit\" /\x3e\n\x3c/div\x3e\x3c/div\x3e\n\x3c/div\x3e\n\x3c/div\x3e\x3cscript type=\"text/javascript\"\x3ejQuery.extend(Drupal.settings.ahah, { \"edit-field-imagefield-0-filefield-upload\": { \"url\": \"/closets/filefield/ahah/image_asset/field_imagefield/0\", \"event\": \"mousedown\", \"keypress\": true, \"wrapper\": \"edit-field-imagefield-0-ahah-wrapper\", \"selector\": \"#edit-field-imagefield-0-filefield-upload\", \"effect\": \"fade\", \"method\": \"replace\", \"progress\": { \"type\": \"throbber\" }, \"button\": { \"op\": \"Upload\" } }, \"edit-field-imagefield-0-filefield-remove\": { \"url\": \"/closets/filefield/ahah/image_asset/field_imagefield/0\", \"event\": \"mousedown\", \"keypress\": true, \"wrapper\": \"edit-field-imagefield-0-ahah-wrapper\", \"selector\": \"#edit-field-imagefield-0-filefield-remove\", \"effect\": \"fade\", \"method\": \"replace\", \"progress\": { \"type\": \"throbber\" }, \"button\": { \"field_imagefield_0_filefield_remove\": \"Remove\" } } });\x3c/script\x3e" }

If I disable "Enforce crop box ratio" then the error goes away and the file can be uploaded and cropped just fine in Firefox.

It works in Chrome regardless of this setting.

I can create a node in Firefox by selecting the image but not "Uploading" it and then hitting the "Save" button on the node. Then I can edit the node and the cropping tools work fine.

Comments

nicholas.alipaz’s picture

Priority: Normal » Critical

Having this same issue. Marking critical as it breaks the intended operation of the module.

oo0shiny’s picture

I'm a little late to the party, but I was having a similar issue. It turned out that I hadn't enabled any image toolkits for the module to use. Once I had enabled the ImageAPI GD2 toolkit under ImageCache (on the modules page), everything started working correctly.

Worked for me, hope it works for you guys.