The message 'Theme key "field_formatter_image" not found.' is raised on the edit-page of a node with Image-fields. The error occurs for every image that is uploaded, so 5 images --> 5 messages.
I use plain Bartik.

I'm not sure if this is a image/theme/Bartik issue.

Related issues:
#560780: Add Image Field to image.module
#674108: ThemeManager::theme() does not trigger an error when a theme hook is not found
#487366: Make the variable system more robust

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

johnv’s picture

Title: Warning 'Theme key "field_formatter_image" not found.' when editing nodes with File/Image » Theme key "field_formatter_image" not found.

After searching through my code base, this message appears to belong to Styles, calling a non-existent File-theme.
The error shows when editing a node with fields of type Image of File, for every attached Image/File.

In styles\contrib\file_styles\file_styles.theme.inc , the unknown theme is called here:

function theme_file_styles_field_formatter_styles($variables) {
  ...
  // Defer to Image Styles for the rest.
  return theme('field_formatter_image', $variables);
}
johnv’s picture

Title: Theme key "field_formatter_image" not found. » Warning 'Theme key "field_formatter_image" not found.' when editing nodes with File/Image
Project: Drupal core » Styles
Version: 7.0 » 7.x-2.x-dev
Component: image system » Code
Priority: Minor » Normal
johnv’s picture

Title: Theme key "field_formatter_image" not found. » Warning 'Theme key "field_formatter_image" not found.' when editing nodes with File/Image

This error supposedly is already fixed image.module in #560780: Add Image Field to image.module comment #78 from 2009, but these changes in image.module are not in my D7.0-system, nor in the latest D7.4-dev:

+    // Theme functions in image.field.inc.
+    'image_widget' => array(
+      'arguments' => array('element' => NULL),
+    ),
+    'field_formatter_image' => array(
+      'arguments' => array('element' => NULL),
+    ),
+    'field_formatter_image_link_content' => array(
+      'arguments' => array('element' => NULL),
+    ),
+    'field_formatter_image_link_file' => array(
+      'arguments' => array('element' => NULL),
+    ),
   );
 }
johnv’s picture

Error still exists after upgrading to D7.9 and Styles-dev 2011-09-12 .
The HP-comment as shown in #1 (// Defer to Image Styles for the rest.) already says it - the directory Image Styles has disappeared from the module.

Attached patch resolves the issue form me. Not sure if it is the right way.

johnv’s picture

Status: Active » Needs review