This is possibly not even worth looking into, but if you have a fresh install of Drupal 6 and the first thing you do is install a module that requires FileField module (and subsequently CCK), you will receive the following error:
Fatal error: Call to undefined function content_notify() in /[path]/filefield/drupal6/filefield.install on line 17
The issue appears to be that as it's trying to install FileField and CCK at the same time, the function content_notify doesn't exist with.
It's quite possible that this is a Drupal issue, not a FileField issue, but it seemed appropriate to post here.
Comments
Comment #1
Matthew Davidson commentedIt's calling the function in content.module before CCK is installed. This patch fixes the problem for me.
Comment #2
drewish commentedI think it's a bit more core than that... can we be sure that the module is fully installed before we call that function?
Comment #3
Matthew Davidson commentedI agree the install process shouldn't attempt to install your module before any dependencies are installed and enabled, but on the basis of a quick straw poll of CCK modules, it looks like there's a well-established convention of being kludgy about it and generously sprinkling drupal_load()s or require_once()s through .install files. I think it's worth raising an issue in core, but given people seem happy to work around it, I wouldn't like to bet that a fix would be applied to 6.x, so I think the workaround should be committed here for expediency (following common practice rather than best practice).
Comment #4
drewish commentedi think i'd rather see this done with module_load_include(). know of any reason not to?
Comment #5
quicksketchIt's worth noting that CCK uses
Since this the module itself isn't an include.
Comment #6
drewish commentedah even better... for some reason i thought that was only for D7...
Comment #7
dlhubler commentedSubmitted patch based on quicksketch's recomemendation and it worked great.
Steps to duplicate
1. Install fresh system
2. Enable filefield module w/o first selecting CCK's content module
3. Confirm prompt that content will also be installed
4. Receive following error (best captured with xdebug installed)
PHP Fatal error: Call to undefined function content_notify() in .../filefield/filefield.install on line 17
Comment #8
dlhubler commentedbump patch
Comment #9
pwolanin commenteddid you mean to set this to duplicate?
Comment #10
dlhubler commentedi did not mean to set this to duplicate, thanks for correcting that. i one point i incorrectly created a separate issue and that's probably why
Comment #11
quicksketchThis patch adds the module_load() in every install hook, to match CCK's implementation. See text.install: http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/cck/modules....
I'd consider this critical, since you can't turn on the module if turning on content.module at the same time.
- Fresh install
- Try to enable content.module and filefield.module at the same time. Error.
Comment #12
quicksketchI created a matching patch for ImageField with these same changes #331158: Imagefield Installer Should Ensure content.module's Loading.
Comment #13
drewish commentedthanks committed to HEAD.
Comment #14
quicksketchAndrew, I owe you one hug. Thank you. :D
Comment #16
The Greenman-dupe commentedhaving this problem to where do i put the patch file to ??