When I was originally planning my custom Drupal project, I ended up creating a custom module and a custom theme, both sharing the same name (let's say myproject). Haven't had any problems until I tried integrating Filefield.
The problem is that myproject_filefield is an ambiguous function name - it can be either a hook called by module_invoke_all('filefield', 'file_validate', $node, $field, $file) or a theme override called by theme('filefield', $file). To be specific, the custom hook I implemented gets called by the theme function, returning a bunch of error messages to the user.
I can get around this issue, but it's hackish and I think it would be cleaner if Filefield did not assign the same name to the hook and theme.
Comments
Comment #1
dopry commentedhmm.. this should probably be resolved at some point in time.
Comment #2
quicksketchYou simply should not name your theme and module the same thing. You'll run into a lot of situations like this, though the most notorious is hook_block() and theme_block(). Considering you'll have this problem with a lot of functions, I don't think it's worth fixing.