By xangelo on
I am developing a module called docman. Within this module is a function called docman_file_delete(). It seems like whenever a piece of content is deleted from Drupal, docman_file_delete() is being called. I'm not sure why this would be since docman_file_delete doesn't really conform to hook_delete(). I am not sure why this would occur, but any thoughts anyone might have on the matter would be greatly appreciated.
Comments
Are you sure you're not using
Are you sure you're not using a D7 release? :P
There's a hook_file_delete() for D7, but not D6. And D6's file_delete() is like 2 lines and couldn't possibly cause the issue you're experiencing AFAICT.
Any contrib modules that could be contributing to this..?
:P I double checked after
:P I double checked after your comment to make sure, but we are on 6.16
A lot of the modules we are using are developed in house, so I'm hoping no one created any custom hooks without documenting them. I'll be pouring over things tonight just to make sure.
Of course, like all IT problems, I can't seem to replicate this consistently.
hook_delete() does not work at all...
I found hook_delete() does not work at Drupal 6.19
The functions are not called at all. I have to use hook_nodeapi() instead.
hook_delete() is only called
hook_delete() is only called if you are defining a content type in your module. If you are trying to work off content types from other modules, hook_delete will not work.
Contact me to contract me for D7 -> D10/11 migrations.
Or anything really. I'm friendly, and open to work or conversation.