Conflict with FileField module
| Project: | API |
| Version: | 6.x-1.2-beta2 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
The FileField module (version 6.x-3.1) has an implicit hook called hook_file_load(), which is used to let a module using its API and functionality add information to the file information array (I think).
The API module function api_file_load() looks like an implementation of this hook (i.e. has the right file name), but it isn't related (I don't think so anyway), and it doesn't have the same arg list, causing a fatal PHP error. The result is that if you have the API module enabled, you cannot display any node with a FileField on it (white screen of death plus a PHP error message in the log).
It doesn't look to me as though that function api_file_load() is being used anywhere in the API module, so my suggested fix would be to remove the function completely. Having done that on my test site, I am not seeing any obvious consequences, but I'm not sure...

#1
Here's a patch against the DRUPAL-6--1 branch (which I think is your active branch right now, not HEAD?). It removes that function.
#2
This matches with the %api_file menu argument. I guess it could all be changed to %menu_filename.
#3
Committed a change to do that.
#4
Works for me, thanks!
#5
Automatically closed -- issue fixed for 2 weeks with no activity.