Hi I've been experiencing the same issues described on https://drupal.org/node/1311828 and https://drupal.org/node/1567356

I followed the steps laid out (patched, etc) and things seemed to look fixed, but when I try and upload an image it givs me the following error:

Exception: Unable to determine type of media from stdClass::__set_state(array( 'fid' => '192', 'uid' => '5', 'filename' => 'Screen Shot 2013-07-29 at 4.51.46 PM.png', 'uri' => 'public://Screen Shot 2013-07-29 at 4.51.46 PM.png', 'filemime' => 'image/png', 'filesize' => '71424', 'status' => '1', 'timestamp' => '1375202026', 'type' => 'undefined', )) in media_get_type() (line 177 of /srv/bindings/590f959dd82b471abc92fce3237dc184/code/sites/all/modules/media/includes/media.types.inc).

It also gives the message that the file has been uploaded, but when I check the files I don't see it in there. I saw that there was one issue on Google+ but I have other sites with the same modules on as this site and they aren't experiencing the same error. Any help would be greatly appreciated :)

Thanks!
Keith

CommentFileSizeAuthor
Screen Shot 2013-07-30 at 4.12.39 PM.png74.49 KBkjwaddel
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

killes@www.drop.org’s picture

That probably means that your media_types table is empty. Can you try and go to admin/config/media and rebuild it?

Note: this fails for me...

killes@www.drop.org’s picture

Try:

drush php-eval 'include_once "sites/all/modules/media/media.install";media_install();'

That gives the media_types table some content.

kjwaddel’s picture

Hi killes, thank you for your replies! So I tried your first suggestion (just in case) and it didn't work for me either. When trying to run the drush command I got "Command not supported as typed". After looking it up, it seems to be related to drush versions (I'm on 5.8). I'm fairly new to drush, but would/could that have anything to do with it?

Thanks again!
Keith

thirdender’s picture

#2 fixed this issue on my site. I'm not sure why drush didn't run for you Keith… You could always install/enable the Devel module and run the PHP in the page devel/php inside your site. If you run the code using the Devel module, it would just be:

include_once "sites/all/modules/media/media.install";
media_install();
paskainos’s picture

#2 also works great when adding the media module to an existing Drupal Commerce installation.

leisurman’s picture

Issue summary: View changes

Thank you #2 works for me. 5000 files and error is gone

Chris Matthews’s picture

Version: 7.x-1.3 » 7.x-1.x-dev
Status: Active » Closed (outdated)

Closing this issue as outdated. However, if you think this issue is still important, please let us know and we will gladly re-open it for review.
sincerely,
- the Drupal Media Team