Conflict with FileField module

jhodgdon - August 12, 2009 - 16:29
Project:API
Version:6.x-1.2-beta2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

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

jhodgdon - August 13, 2009 - 18:06
Status:active» needs review

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.

AttachmentSize
547338.patch 563 bytes

#2

drumm - August 18, 2009 - 04:11
Status:needs review» needs work

This matches with the %api_file menu argument. I guess it could all be changed to %menu_filename.

#3

drumm - August 18, 2009 - 04:20
Status:needs work» fixed

Committed a change to do that.

#4

jhodgdon - August 18, 2009 - 15:10

Works for me, thanks!

#5

System Message - September 1, 2009 - 15:20
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.