There are folllowing situation:
We have a product-nodes with an imagefield.
A new subproducts-nodes will be created after generating and adding subproducts to main product node. Subproducts-nodes creates with a copy of parent product node content, and there we have an issue: filepath in imagefield will be the same for each this nodes (subproducts and parent product). So after delete one of that subproducts we obtain an empty imagefields in other nodes 'cause a file was deleted too.

My proposition is making a check for the same filepath in file table inside _imagefield_file_delete(). Will this help?

Comments

quicksketch’s picture

This particular problem has been fixed in Drupal 6 with the introduction of hook_file_references(). Now the same file can be referenced between multiple nodes and will only be deleted when every node that use the same file is deleted.

The Drupal 5 version of ImageField is now unsupported and no developers are working on it. Unless a patch is provided, this problem will not be fixed. It'd be a better investment of your time to upgrade your site to Drupal 6.

quicksketch’s picture

Status: Active » Closed (won't fix)