Drupal 7.8 Upgrade Issues

UPDATE: Media module has since been updated and the problem washed. Before going with what's below, try upgrading Media package to the latest recommended version. Article which covers this update found here.


Drupal 7.8 upgrade from 7.7 caused me to panic.

Trying to access /admin/content threw unknown error. When studying the recent logs, I found this entry:

EntityMalformedException: Missing bundle property on entity of type file. in entity_extract_ids() (line 7389 of  /includes/common.inc).

Wow.. Found the solution here:

http://drupal.org/node/1266620

Ended up changing line 7388 of /includes/common.inc from:

if (!isset($entity->{$info['entity keys']['bundle']}) || $entity->{$info['entity keys']['bundle']} === '') {

to

if (!isset($entity->{$info['entity keys']['bundle']})) {

Apparently the real problem lies within the Media module and upgrading Drupal further will reset your changes until the Media module gets fixed. Until then, at least your Drupal 7.8 installation will be back on track.. for now..