Cannot upload default image

wclkw - May 16, 2008 - 03:27
Project:ImageField
Version:5.x-2.1
Component:Documentation
Category:support request
Priority:critical
Assigned:Unassigned
Status:active (needs more info)
Description

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%5Capache2triad%5Chtdocs%"

I am using Imagecache ver 5.x-2.0. Is this causing the default image problem?

Thanks in advance for anyone who helps.

#1

thePanz - May 16, 2008 - 08:25

Hi, 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.

#2

drupaloSa - May 18, 2008 - 19:33

Seems 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.

#3

dopry - May 19, 2008 - 23:24
Status:active» active (needs more info)

I 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.

#4

thePanz - May 21, 2008 - 07:59

I 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

#5

drupaloSa - May 21, 2008 - 12:42

This was the case for me too, but it was happening only for the existing nodes. The newly created nodes show the default picture correctly.

#6

christefano - July 21, 2008 - 10:04

I just got the same error on a Linux server. I couldn't reproduce it.

#7

liquidcms - September 29, 2008 - 21:28
Priority:normal» critical

I 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.

#8

liquidcms - September 30, 2008 - 01:09

this patch to imagefield fixed my problem.

http://drupal.org/node/252343#comment-915174

#10

rlnorthcutt - October 28, 2008 - 05:36

I 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?

#11

rlnorthcutt - October 28, 2008 - 05:41

Correction - the default image is suddenly showing up (maybe it needed a cron run?) BUT the teaser image is not.

#12

vannen - November 18, 2008 - 23:37

>>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.

 
 

Drupal is a registered trademark of Dries Buytaert.