Narrow down which module is causing a PHP warning All of a sudden a site on my development server has been producing this php notice:

Notice: Use of undefined constant FIELD_BEHAVIOR_DEFAULT - assumed 'FIELD_BEHAVIOR_DEFAULT' in _field_info_prepare_instance() (line 297 of /var/www/mysite/modules/field/field.info.inc).
Notice: Use of undefined constant FIELD_BEHAVIOR_DEFAULT - assumed 'FIELD_BEHAVIOR_DEFAULT' in field_behaviors_widget() (line 458 of /var/www/mysite/modules/field/field.info.inc).


Is there anyway to narrow down which module could be causing this error? I've tried disabling a couple but have had no luck so far. I don't want to just disable the display of the warning as I feel I need to find the root of the issue :)

Has anyone else seen this error before? I suspected it might've been the GMap and Location modules for D7, but I've now removed them and I'm still getting this issue.

Thanks for your help!
FIELD_BEHAVIOR_DEFAULT is defined in the core field.module file, which will always be loaded into the page build if you have the core field module enabled.

If you're getting an error that it's not defined then either the field module isn't being loaded for whatever context you're receiving the error in, or the field.module file has been corrupted/changed.

Try getting the field.module file from a fresh copy of Drupal and replacing it on your site, that might fix the problem. If not, grep your sites/all/modules folder for the string FIELD_BEHAVIOR_DEFAULT. That should help you narrow down the modules that use it, and which ones you should try to disable.