I am attempting to add an imagefield_crop field to my advanced user profiles. I can add a normal imagefield and it behaves perfectly, uploading and displaying fine when viewing or editing the advanced user profile.
However, as soon as I switch the field type to imagefield_crop, the image disappears. Instead, in profile edit, I am displayed:
jfield crop | Crop area:
|
(blank space | [remove button]
where image |
should be) |
In my Drupal logs, each time the page is viewed it registers:
Type: page not found
Location: http://sitename.com/system/files/picturename.jpg.crop_display.jpg
Referrer: http://uomeds.com/user/1/profile/uprofileI have ImageMagick and GD2 enabled.
My only guess as to what might be wrong is perhaps it might be an Ajax issue. Upon initially building the site, I had 406 problems with Ajax view pagination, where next/previous page links provided by Ajax simply would not work. My web host added an allowance for "/views/ajax" to get it fixed:
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>Perhaps I need something similar here?
If maybe, I would prefer to figure out for sure first before bugging them. They have been quite accommodating, and I don't want to push my luck with erroneous requests.
Any info on what might be causing this and how to fix it would be very helpful.
Thanks.
Comments
Comment #1
yhager commentedThe code should create this file - do you get any other error before/after? Is there an error in the status page?
Did you try to upload a new image to the crop interface too?
Comment #2
yhager commentedAlso - does the file exist in the filesystem in the designated location?
Comment #3
uomeds commentedI think your second question explained what's happening, though I still don't know how to fix it.
According to my Drupal error logs and the red x image boxes in IE, it's attempting to load the pictures as:
http://sitename.com/system/files/picture.png.crop_display.jpgbut there is no
/system/files/..path on my website and I don't think there should be on a typical Drupal installation.It should be saving and loading from:
http://sitename.com/sites/default/files/..My
File path:Path Setting in field management is left blank and inserting/sites/default/files/causes it to tell me I can't specify that directory, as I presume it (should already be) the default.Any ideas? What should I check next?
Thanks.
Comment #4
uomeds commentedMy web host checked it out on their end at my request and replied:
Comment #5
yhager commentednice helpful host you got yourself!
check the "file system" page under the admin settings ('admin/settings/file-system')
Comment #6
uomeds commentedYa, I've had a lot of unpleasant hosts in the past (site5 was my last), but these guys I'm with now (canadianwebhosting.com) really are incredible. Best host I've ever had. (If I'm not allowed to mention hosts by name on here, feel free to edit it out or I will if needed.)
Regarding the file paths, I checked and 'File system path' is set to
sites/default/filesas I think it should be. Temporary directory is/tmp. Download method is set to "private".So I think the default path is correct, but for some reason imagefield_crop is sending to
/system/filesinstead. Not sure where that path is coming from as I have not seen it in any situation before now.Comment #7
uomeds commentedFollow up: I just checked, and when the field type is set to ImageField rather than ImageField_crop, it uploads successfully to
http://sitename.com/system/files/imagefield_thumbs/picture.pngand displays normally.So again I'm not sure why it's using that path, but it seems to work fine for Imagefield regardless. Imagefield_crop on the other hand continues to fail, with seemingly no picture uploaded, and no picture found to display.
Comment #8
yhager commentedThis is an issue with private downloads. Can you set them to public? if not, issue #423652: Private file system can't see crop_display.jpg image. has a patch.
marking as duplicate.
Comment #9
uomeds commentedOh, well that was simpler than I thought. Thanks.
It's working set to public. Remarkable plugin. Well worth the headache these past few days. I will try the private patch.
Comment #10
uomeds commented