My site is working fine with ImageField 5.x-1.2-rc1. I have updated to version 5.x-2.1 in order to use the default image function. I set download method as Public.
1. When I tried to add imagefield type,browse my default image and save field setting, i got the following warning:
" warning: unlink(): Permission denied in C:\apache2triad\htdocs\sportsarena\modules\imagefield\imagefield.module on line 177 "
2. I tried to configure the imagefield, under default image portion, it display red cross icon for the default image. I right click the image properties it shows "http://localhost/sportsarena/files/C:/apache2triad/htdocs/temp/none.gif"
3. If i create new content and upload image, the image can display without any problem. However, if i did not upload any photo, the default image didn't show up but red cross icon with properties shows "http://localhost/sportsarena/files/imagecache/thumbnail/C%3A%5Capache2tr..."
I am using Imagecache ver 5.x-2.0. Is this causing the default image problem?
Thanks in advance for anyone who helps.
Comments
Comment #1
thepanz commentedHi, I got the same problem here with 5.x-2.1 release: configuring default image I get Drupal error about "unlink()" function, and no default image is saved with my field:
I get this error:
warning: unlink(c:\windows\temp/agt_member.png) [function.unlink]: No such file or directory in C:\[...]\modules\imagefield\imagefield.module on line 177.
Comment #2
drupaloSa commentedSeems to be related with this:
http://drupal.org/node/252343
Try to create a "imagefield_default_images" folder in files directory and set permissions to 777.
Comment #3
dopry commentedI would try removing the c:\ from your file_directory_path, does this help? I don't have windows so I can't test on this platform...Patches are welcome from users of windows...
.darrel.
Comment #4
thepanz commentedI Created the "imagefield_default_images" directory inside my "files" Drupal folder. Now uploading default image works fine, but I can't get them displaeyd when a node don't have an image in that field...
Regards
Comment #5
drupaloSa commentedThis was the case for me too, but it was happening only for the existing nodes. The newly created nodes show the default picture correctly.
Comment #6
christefano commentedI just got the same error on a Linux server. I couldn't reproduce it.
Comment #7
liquidcms commentedI have used this lineup of modules before and it worked.. but not now.
I have this:
imagefield: 5.x-2.1
imagecache: 5.x-2.1
imageapi: 5.x-1.2
when i go to a node that has an image it works fine and my path to that image looks like this:
http://cs.peter/files/imagecache/product_spp_main/images/products/fujifi...
when i go to a node that doesn't have an image uploaded for that field, i get the path to my default image as this:
http://cs.peter/files/imagecache/product_spp_main/c%3A/tmp/cs_tmp/produc...
yes, i am on windows and my 'file_directory_temp' => 'c:/tmp/cs_tmp',
i have tried various options for this including flipping / to \ and also removing c:.. the path does change; but it is still wrong as this shouldn't be inlcuded in the path at all.
I'll try on linux next.
Comment #8
liquidcms commentedthis patch to imagefield fixed my problem.
http://drupal.org/node/252343#comment-915174
Comment #9
ckngYou may need both of
#259220: "permission denied" when deleting directories on Windows
#252343: imagefield_default_images directory is hardcoded and seems fto be required but never created
Comment #10
rlnorthcuttI had to create the folder in files to make it work (no big deal) and now the default image is showing up in the CCK imagefield edit screen.
However, it is NOT showing up for any nodes without images! I have tried editing and saving existing nodes without images, and I have also tried creating new nodes without images... no luck either way...
Any ideaS?
Comment #11
rlnorthcuttCorrection - the default image is suddenly showing up (maybe it needed a cron run?) BUT the teaser image is not.
Comment #12
vannen commented>>now the default image is showing up in the CCK imagefield edit screen.
>>However, it is NOT showing up for any nodes without images! I have tried editing and saving existing nodes without images, and I have also >>tried creating new nodes without images... no luck either way...
I have the same issue, still. Tried cron but still the default image isn't attached to the node.
Comment #13
johnhanley commentedDitto.
Checked "Use default image" and uploaded image, but default image is not defined for content type imagefield. Confirmed file folder permissions are correct. Searched files folder hierarchy and uploaded image file does not exist anywhere.
Comment #14
mtraherne commentedHaving exactly the same symptoms as above.
Inital set-up:
Drupal 5.12
Imagefield 2.1
First problem was uploading and attaching an image to a node with image field. Initially it looked like image had been uploaded, but when configuring the field I saw the broken image place holder, with a reference to very broken path.
I created the folder "imagefield_default_images" in the files folder. I can now upload files, but they do not appear on any nodes.
I have upgraded to imagefield 2.2 - still no default image. (without editing anything). Going to try a few other bits - will comment back here if I get anything to work.
As is been 2 months since anyone else commented, I'm guessing that most people have this working. Any help would be great.
Comment #15
johnhanley commentedNope. It's still not working for me.
I moved onto to other more pressing tasks, but this issue still needs a solution.
Comment #16
mtraherne commentedwell, I've got a bit further. You must go into each of your content types and check that the display is showing the image
you can do this at:
admin/content/types/$type/display
(where $type is the type name)
Note to all ubercart users - your default image will be hidden by default. I am now searching for a solution for ubercart.
Comment #17
ekrispin commentedI have the same problem - applied the fix but still... the display of the cck shows the default image but it does not show in the nodes when no image is uploaded.
Comment #18
quicksketchThis was fixed in the 2.2 version (released December 30, 2008) after the fix liquidcms pointed out was finally included in an official release. See #252343: imagefield_default_images directory is hardcoded and seems fto be required but never created.
Please reopen if this problem still exists in the 2.6 version, but I'm pretty sure this is a duplicate of that other issue.