All of a sudden I'm seeing a notice that I didn't see before:

Notice: Undefined index: type in media_field_formatter_settings_form() (line 86 of /var/www/sites/all/modules/media/includes/media.fields.inc).

It occurs at all /admin/config/media/file-types/manage/*/file-display/* paths. When I save the form on such a page, the message appears twice.

The most recent change I made, was adding a view mode in a custom module according to #1026790-29: Allow view modes to be dynamically defined.:

/**
 * Implements hook_entity_info_alter().
 * Add a view mode for medium-sized media.
 */
function mymodule_entity_info_alter(&$entity_info) {
  $entity_info['file']['view modes']['media_medium'] = array(
    'label' => t('Medium'),
    'custom settings' => TRUE,
  );
}

I'm not sure if this is the cause of the problem. When I tried commenting out this function and clearing all caches, the notice remained.

Comments

Dave Reid’s picture

Status: Active » Postponed (maintainer needs more info)

I haven't seen this recently. Has this still been a problem for you?

marcvangend’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

No, I haven't experienced this lately and I'm not sure what caused it to go away. Closing this now, to be re-opened if someone runs into this again.