I get this error when I press the "add media button" in Wysiwyg, when it opens media upload window.

Warning: Invalid argument supplied for foreach() in views_handler_filter_file_type->get_value_options() (line 11 of /srv/bindings/ae39e80e08e149a583d07c659a7d289b/code/profiles/panopoly/modules/contrib/file_entity/views/views_handler_filter_file_type.inc).

Uploading files doesn't work it just outputs:
<img src="/modules/file/icons/image-x-generic.png" title="image/jpeg" alt="" class="file-icon media-image img__fid__61 img__view_mode__default attr__format__default" data-mce-src="/modules/file/icons/image-x-generic.png">

Anyone who could give me some idea what to do? Kinda tricky figure this one out because it seems like im the only one who has this error on media module.

Using version: "7.x-2.0-unstable6+39-dev"

All your help is very much appreciated, thanks...

CommentFileSizeAuthor
2012-11-01 10:39:17.png59.71 KBAnonymous (not verified)
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ParisLiakos’s picture

Project: D7 Media » File Entity (fieldable files)
Version: 7.x-2.0-unstable6 » 7.x-2.x-dev
Component: File entity » Code
Category: bug » support
Priority: Critical » Normal
Status: Needs review » Postponed (maintainer needs more info)

can you check if you get the same error using latest dev?
also checking the error, my guess is that you have no file types available.
Can you check under structure -> file types if there is any type availabale?

sctteea’s picture

Status: Postponed (maintainer needs more info) » Active

I ran into the same issue as above after updating from "7.x-2.0-unstable6+2-dev" to "7.x-2.0-unstable6+13-dev" (the versions that came along with Panopoly updates).

Essentially everything works fine with a fresh install but after running the update database scripts I get the above error.

I checked the file types and sure enough they are empty on the upgraded version but are not on the fresh intall.

Are these values that are provided by this module?

sctteea’s picture

After a little more digging, it looks like the "file_type", "file_type_mimetypes", and "file_type_streams" tables are missing. I checked in file_entity.install and see that these should have been added in "file_entity_update_7201".

I ran a database update on another copy of a database and the only update that it shows as available is "7202". Is there any way to force the older ones to run?

I'm guessing they were either run in a past upgrade and failed, or were never run.

ParisLiakos’s picture

You should check in the database, the system table and the schema field..it should be on 7202 now.Update it to 7201 and run update.php

sctteea’s picture

Thanks rootatwc.

I ended up finding that the schema_version had been set to 7201 in the past, but apparently 7201 had never been run or failed for some reason. I changed it back to 7200 so that both 7201 and 7202 would be run.

All is right in the world again.

Scott

ParisLiakos’s picture

Status: Active » Fixed

awesome:)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

sibiru’s picture

Version: 7.x-2.x-dev » 7.x-2.0-unstable7

I had this issue too, on pantheon too but on custom install