Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
Dave ReidI haven't seen this recently. Has this still been a problem for you?
Comment #2
marcvangendNo, 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.