? .cache ? .settings Index: modules/field/field.module =================================================================== RCS file: /cvs/drupal/drupal/modules/field/field.module,v retrieving revision 1.47 diff -u -p -r1.47 field.module --- modules/field/field.module 31 Oct 2009 18:00:48 -0000 1.47 +++ modules/field/field.module 13 Nov 2009 18:05:06 -0000 @@ -680,9 +680,17 @@ function template_preprocess_field(&$var $field_type_css = strtr($field['type'], '_', '-'); $field_name_css = strtr($field['field_name'], '_', '-'); - // If the formatter is multiple, the template sees only one 'item', which - // will include all values. - $items = $element['#formatter_single'] ? $element['items'] : array($element['items']); + // Prepare an $items variable that the template can simply loop on. + if ($element['#formatter_single']) { + // Filter out non-children properies that might have been added if the + // renderable array has been through form_builder(). + $items = array_intersect_key($element['items'], array_flip(element_children($element['items']))); + } + else { + // If the formatter is multiple, the template sees only one 'item', which + // will include all values. + $items = array($element['items']); + } $additions = array( 'object' => $element['#object'],