incorrect default image deletion
| Project: | ImageField |
| Version: | 6.x-3.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
This may be a duplicate of http://drupal.org/node/43273, however it has a different symptom.
In their issue, the image field is showing the same for two when it's suppose to be one for each content type
My issue is I keep losing a default image field file .
cck 2.4
image field 6.0
Default settings for image field other than default
755 perm for the default image directory
I'm ATM trying to set multiple default images for already existing content types on one field (field_icon).
I add the field, field_icon to contenttype1 and set the default image. It works
I add field_icon to ct2. it shows the image for ct1, i upload my image for ct2. It works. But the image for content type1 has been REMOVED, gone completely from the file directory (settings are still there).
Go back and readd the image and it eventually sticks to ct1.
When I go to ct3 and add the field_icon it shows the image for ct1 under default image . I upload my image, works fine, but ct1's image has been destroyed again.
Looks like the issue is that imagefield(filefield?) needs to check before deleting a file so not to blow up other field's default image. I haven't dug into the code though so can't be certain(filefield scares me a lot).

#1
Thanks for the great bug report. Seems like a likely problem to occur in the circumstances you described.
#2
I've confirmed this problem exists. No easy solution to fix it though... we'll need to do some kind of loop through all instances of a field and check that the same image isn't being used elsewhere.