in Admin menu when accessing the Media link under Content and switching to thumbnail view the following error message is shown:
Notice: Undefined index: #file in theme_media_thumbnail() (line 288 of .../sites/all/modules/media/includes/media.theme.inc)

This is due to the administrator not performing the following task:

In Drupal 7 - You need to rebuild the media file types:: Admin Menu::Configuration / Media /Rebuild Type information for Media.

Can the error message be caught and a friendlier hint to perform the task be given to the Administrator?

Comments

Priority:Minor» Major

Myself, and some others (as seen http://drupal.org/node/1306608) have this problem when trying to upload PDF files, and using the "rebuild media types" link does NOT address the problem. Anyone having similar problems? I'm using the April 9 dev version of 7.1x and it hasn't been resolved.

Notice: Undefined index: #file in theme_media_thumbnail() (line 288 of /drupal/sites/all/modules/media/includes/media.theme.inc).

Notice: Trying to get property of non-object in theme_media_thumbnail() (line 288 of /drupal/sites/all/modules/media/includes/media.theme.inc).

Version:7.x-1.0-rc3» 7.x-1.1

This looks to also be a problem with PPT and PPTX files. I'm pretty sure it's going to crop up whenever there isn't explicitly an image file to work with. I did the Full release of 1.1 and this is still a problem.

+1? As per http://drupal.org/node/1306608 his bug makes D7 + Media module completely useless for uploading pdf's. Any timeline on a fix for this? If I knew more about the module I'd look into it myself.

The fix that I found only recently was that you have to set the file type settings under configuration. If you click on the "File types" under the Media section you will see a list of default media types. The one you want to update is "Application (mulitpurpose)". At least this was the one that I found on my install. Click "Manage file display" and check the box next to generic file. You should be under the default display when you do this. Save it and this should clear up the problem.

I had some default PDF icons show up, but at least I could see my PDF files in the thumbnail view.

Assigned:Unassigned» mpgeek
Status:Active» Postponed (maintainer needs more info)

Have any of you tried 7.x-1.2? I'm unable to reproduce with 7.x-1.2.

My site was still using the 7.x.1.1. I haven't been able to test this on the 7.x-1.2 on a DEV environment.

#4 post fixed my problem. Im using media 7.x-1.2

Status:Postponed (maintainer needs more info)» Closed (works as designed)

Status:Closed (works as designed)» Active

I'm having this same issue.

I saw that all of my PDF's were in the list of files for the Media module, so I tried embedding one of them onto an article using the Media Browser within CKEditor. These are the versions of the Media module that I've tried this with:

7.x-1.2
7.x-2.0-unstable6
7.x-2.x-dev

When I try this, all that gets embedded is the large media icon for files, and it doesn't link to anything. I've tried selecting "Link", "Large", and "Original" from the drop-down within the media browser, but it never works.

This is what's in the source code when I select "Link":
[[{"type":"media","view_mode":"media_link","fid":"129","attributes":{"alt":"","class":"media-image","typeof":"foaf:Image"}}]]

And this is what's there if I select "Original":
[[{"type":"media","view_mode":"media_original","fid":"129","attributes":{"alt":"","class":"media-image","typeof":"foaf:Image"}}]]

The PDF file I'm testing out is only 5.67 KB, so file size is not an issue here. Isn't this functionality supposed to be part of this module? Thanks in advance for any help or direction.