After I've downloaded and installed the 7.x-1.4 version from the media module I received the following error messages on the file entity manage file display settings form:

Notice: Undefined index: type in media_field_formatter_settings_form() (line 110 of .../sites/all/modules/media/includes/media.fields.inc).
Notice: Undefined index: settings in media_field_formatter_settings_form() (line 106 of .../sites/all/modules/media/includes/media.fields.inc).
Notice: Undefined index: type in file_entity_field_formatter_settings_form() (line 29 of .../sites/all/modules/media/file_entity/file_entity.field.inc).
Notice: Undefined index: settings in file_entity_field_formatter_settings_form() (line 26 of .../sites/all/modules/media/file_entity/file_entity.field.inc).

Comments

hairqles’s picture

bertvivie’s picture

Hi, having the same error, working on a new site, wanted to embed Youtube video's so installed media and media_youtube, when opening file types in configuration and selecting video the above errors are shown.

inversed’s picture

I get this error as well. I noticed it after updating the Media: YouTube module. The preview settings for the video file display were lost and I had to set them up again.

After reconfiguring the lost preview settings and applying the patch, things are working correctly again and the error message is gone.

hairqles’s picture

Status: Active » Needs review
rob c’s picture

#1 looks good.

camhoward’s picture

Thanks! The patch by hairqles in #1 solved the error messages I was getting after installing Media 7.x-1.4.

quickdraw6906’s picture

Patch worked great.

Jason2014’s picture

This patched worked for me!

Jason2014’s picture

Status: Needs review » Reviewed & tested by the community

Moving to Reviewed & tested by the community.

stefan.r’s picture

Thanks for the patch

siggi_hrafn’s picture

Work's great!! Thanks

guillaumeduveau’s picture

Patch #1 works for sure, now does someone have the time to check if what's removed and added is fine ?

AAP’s picture

gameonhanin’s picture

gameonhanin’s picture

how to fix this fixed i mean should i replace my original on below patch

https://drupal.org/files/issues/media-error-message-when-editing-file-en...

jbeall1369’s picture

it asks me "File to patch" after I run it. What file is it because I am having no luck

stefan.r’s picture

You can go to the file_entity folder and run patch -p1 < media-error-message-when-editing-file-entity-display-options-2171115-1.patch.

jbeall1369’s picture

Holly Cow, I have been using Drupal for years and have never figured out how to patch modules. It finally worked. I had to enter file_entity.module for the file name it was looking for. Thanks guys, SSH is so simple but impossible to figure out. I will make a full tutorial soon.

gameonhanin’s picture

sorry for asking again but how to patch should run from file manager or what i do for update this patch?

muriqui’s picture

Status: Reviewed & tested by the community » Closed (duplicate)

I don't think this is the right solution; the patch does eliminate the error, but it also leaves the 'entity_type' and 'bundle' properties under $mock_instance['display'][$view_mode], which is not where they are supposed to be. It looks like this problem originated with a bad backport of a Media 7.x-2.x patch in #2062567: Supply more information in $instance in file_entity_file_formatter_file_field_settings(). There's a patch there for 7.x-1.x with the correct fix, so marking this issue as a duplicate.

Status: Closed (duplicate) » Needs review
devin carlson’s picture

Status: Needs review » Closed (duplicate)
shaneonabike’s picture

Could you tag the duplicate so that people can follow that since I'm still getting this error?

bobbia’s picture

The duplicate issue is: Supply more information in $instance in file_entity_file_formatter_file_field_settings(). Note that I am also still receiving the same error - see https://www.drupal.org/node/2062567#comment-9500485 for the details.

Thanks!
Bobbi

bobbia’s picture

I installed the above patch (https://www.drupal.org/node/2171115#comment-8362819), and things are working well now.
Thanks!
Bobbi