I get the warning above when viewing the user profile and some other pages.

The affected code is:
$display['module'] = $formatter_type['module'];

So far to debug, added:
if (!isset($formatter_type['module'])) {
watchdog('core', '_field_info_prepare_instance_display formatter_type[module] not set', array(), WATCHDOG_WARNING);
dd($formatter_type, 'core _field_info_prepare_instance_display');
}

This gives a debug file with 1194 lines :-), see attached.
Doing a "grep module /tmp/drupal_debug.txt" didn't show and empty module lines, although module seems to be one level down in the array, where as the above code looks for it on the first level.

then tried to dd($display),

(
[label] => hidden
[module] =>
[settings] => Array
(
)
[type] =>
[weight] => 5
)
(
[label] => hidden
[type] =>
[settings] => Array
(
)
[weight] => 8
[module] =>
)

It looks like something is setting label=hidden instead of type=hidden, and the module entry is empty?

Next tried ddebug_backtrace(), but was unsure how to dig further:
21: _field_info_prepare_instance_display (Array, 4 elements)
20: _field_info_prepare_instance (Array, 4 elements)
19: _field_info_collate_fields (Array, 4 elements)
18: field_info_field_by_ids (Array, 4 elements)
17: field_attach_load (Array, 4 elements)
16: attachLoad (Array, 7 elements)
15: load (Array, 7 elements)
14: entity_load (Array, 4 elements)
13: file_load_multiple (Array, 4 elements)
12: attachLoad (Array, 7 elements)
11: load (Array, 7 elements)
10: entity_load (Array, 4 elements)
9: user_load_multiple (Array, 4 elements)
8: user_load (Array, 4 elements)
7: _menu_load_objects (Array, 4 elements)
6: _menu_translate (Array, 4 elements)
5: menu_get_item (Array, 4 elements)
4: menu_execute_active_handler (Array, 4 elements)
3: user_page (Array, 2 elements)
2: call_user_func_array (Array, 4 elements)
1: menu_execute_active_handler (Array, 4 elements)

Any suggestions to locating the module causing this, or improving the core warning message to the same effect?

CommentFileSizeAuthor
drupal_debug.txt26.84 KBboran
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Refineo’s picture

Version: 7.9 » 7.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.