Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Fatal error: Call to undefined function imagefield_widget_settings_save() in /usr/home/hoslo/public_html/sites/all/modules/imagefield/imagefield.module on line 154
This is after upgrade to 6.11
Comments
Comment #1
quicksketchThe function is definitely there, it's at line 186 of imagefield_widget.inc. It sounds like ImageField was not properly installed. I'd suggest deleting the entire "imagefield" directory from sites/all/modules, then recopying it to the server. The imagefield_widget.inc file is pulled in immediately during hook_init() so there's no reason why that function should not exist.
Comment #2
Starminder CreditAttribution: Starminder commentedThanks, I put it back in and no problems. Must be another module stomping on it. Thanks!
Comment #4
gregglesFwiw, I get this error when running "drush updatedb" from the command line. I can repeat it consistently.
Is how the code is loaded, which is as "right" as it can be. Maybe the way that drush runs update.php doesn't call hook_init?
Comment #5
acrollet CreditAttribution: acrollet commentedI'm also seeing this using drush fwiw...
Comment #6
gregglesSo, it's a bug. And the solution is to move those includes to the point before the function is called.
I'm marking it "won't fix" since it affects such a small group of people. @quicksketch, if you disagree please re-open and we can see about a fix.
Comment #7
skwashd CreditAttribution: skwashd commentedReopening this and moving it to drush based on a discussion with Vertice on #aegir
I have the same symptoms when using imagefield and filefields in an install profile. I have spent days trying to track it down.
hook_init() isn't fired by drush which causes image/file fields to break. I am sure there are other places where code relies on hook_init() which could break too.
In these 2 cases the hook calls module_load_include() which uses require_once() so it is safe to execute this multiple times in a single invocation of drush.
Comment #8
adrian CreditAttribution: adrian commentedI committed a patch for this into provision's drupal 6 install code, that seems to solve the problem.
Comment #9
amitaibuSubscribe.
Comment #10
quicksketchThis should also be corrected by a change in the 3.1 version of ImageField/FileField. See #505860: Fragile during install profiles and #505862: Fragile during install profiles. I'm not sure a change should be made to Drush because the same problem exists when installing a module via an install profile (hence the changes to ImageField and FileField).
Comment #11
moshe weitzman CreditAttribution: moshe weitzman commentedreopen as needed.
Comment #12
gregglesI agree - we've got a pretty good indication that if you're calling your API from your .install you're doing it wrong - http://drupal.org/node/576848
Comment #13
apaderno