I get Fatal error: Call to undefined function filefield_get_field_list() in modules/imagefield/imagefield.module on line 137 when running cron, both from the web as well as from drush.

Comments

okokokok’s picture

Title: Fatal error: Call to undefined function filefield_get_field_list() in modules/imagefield/imagefield.module on line 137 » cron: "Fatal error: Call to undefined function filefield_get_field_list() in modules/imagefield/imagefield.module on line 137"
Status: Active » Fixed

Same with -dev version.

cron hadn't successfully completed for more than a week.

This is on a multi-site installation.
imagefield was only in the specific site's modules directory, problem resolved when moved to all/modules/

Status: Fixed » Closed (fixed)

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

okokokok’s picture

This might help others: Move both filefield and imagefiled to sites/all/modules.

okokokok’s picture

Status: Closed (fixed) » Needs work

Appearing on another site, not sufficient to make sure *field is in sites/all/modules (and nothing in sites/example.com/modules).

Fatal error: Call to undefined function filefield_get_field_list() in sites/all/modules/imagefield/imagefield.module on line 128
quicksketch’s picture

Category: bug » support
Status: Needs work » Active

filefield_get_field_list() is directly within filefield.module. There's no reason why this file wouldn't be loaded. I suggest you double-check that you don't have stray copies of filefield installed on your server. Check the "system" database table to see which version of FileField is being loaded (look in the "filepath" column).

okokokok’s picture

Version: 6.x-3.3 » 6.x-3.7
Status: Active » Closed (fixed)

I upgraded, problem still there.
Problem was fixed after disabling and re-enabling FileField.

okokokok’s picture

Status: Closed (fixed) » Active

I think I was too fast, this problem is still occurring. system table looks but somehow drush sm doesn't show a version number for filefield.


mysql> select * from system where name = 'filefield'\G
*************************** 1. row ***************************
      filename: sites/all/modules/filefield/filefield.module
          name: filefield
          type: module
         owner: 
        status: 1
      throttle: 0
     bootstrap: 0
schema_version: 6104
        weight: 0
          info: a:8:{s:4:"name";s:9:"FileField";s:11:"description";s:26:"Defines a file field type.";s:12:"dependencies";a:1:{i:0;s:7:"content";}s:7:"package";s:3:"CCK";s:4:"core";s:3:"6.x";s:3:"php";s:3:"5.2";s:10:"dependents";a:0:{}s:7:"version";N;}
1 row in set (0.00 sec)

$ drush sm|grep filefield
 CCK                               FileField (filefield)                                             Module  Enabled                       
 CCK                               FileField Meta (filefield_meta)                                   Module  Not installed                 
 CCK                               FileField Tokens (filefield_token)                                Module  Not installed                 
okokokok’s picture

Status: Active » Fixed

With some more fiddling around... The problem was that content_access was not defined, which is freaking weird as well.
I added return false to filefield_view_access(); ran cron once, then removed return false and now cron seems to be running fine again...

function filefield_view_access($field_name) {
  return FALSE;
  if (!content_access('view', content_fields($field_name))) {
    return FALSE;
  }
  // No content permissions to check, so let's fall back to a more general permission.
  return user_access('access content') || user_access('administer nodes');
}
quicksketch’s picture

Check to make sure you don't have multiple copies of modules within your Drupal installation. This can be particularly confusing if you're running Acquia Drupal (which puts modules directly in /modules instead of /sites/all/modules) or if you've renamed previous copies of modules to back up directories like cck.bak or sites/all/modules/backups or something like that. Drupal will find modules no matter where you put them if they're anywhere in a modules directory.

Status: Fixed » Closed (fixed)

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