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
Comment | File | Size | Author |
---|---|---|---|
Screen Shot 2013-07-30 at 4.12.39 PM.png | 74.49 KB | kjwaddel |
Comments
Comment #1
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedThat 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...
Comment #2
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedTry:
drush php-eval 'include_once "sites/all/modules/media/media.install";media_install();'
That gives the media_types table some content.
Comment #3
kjwaddel CreditAttribution: kjwaddel commentedHi 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
Comment #4
thirdender CreditAttribution: thirdender commented#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:Comment #5
paskainos CreditAttribution: paskainos commented#2 also works great when adding the media module to an existing Drupal Commerce installation.
Comment #6
leisurman CreditAttribution: leisurman commentedThank you #2 works for me. 5000 files and error is gone
Comment #7
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedClosing 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