Enabling the module caused the following error:
"PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'base.type' in 'field list': SELECT base.fid AS fid, base.uid AS uid, base.filename AS filename, base.uri AS uri, base.filemime AS filemime, base.filesize AS filesize, base.status AS status, base.timestamp AS timestamp, base.type AS type FROM {file_managed} base WHERE (base.fid IN (:db_condition_placeholder_0)) ; Array ( [:db_condition_placeholder_0] => 0 ) in DrupalDefaultEntityController->load() (line 196 of /etc/drupal/7/includes/entity.inc)."
Causes complete lockout of site. Only way to fix this is to move or rename the module folder and flush the cache. Since the error won't allow the user to browse to any regular pages (goes to the maintenance page), your best bet is to visit http:your-site-domain-name/devel/cache/clear (works only if you have the Devel module installed). Then restore or rename the module back to "media", visit the module list, disable & uninstall.
Anyone who knows an alternate method to flush the cache, for those unfortunate enough not to have the Devel module, please post your solution here or start a thread in the forums.
Comments
Comment #1
JacobSingh CreditAttribution: JacobSingh commentedCan you specify the versions of core and styles you are using? It sounds like media didn't install cleanly for you since you're missing a field which is added during install. Does this happen on a fresh install?
downgrading since this doesn't seem to be happening for anyone else.
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedThis was a new installation. At the time I enabled it, I didn't have any styles defined.
Comment #3
JacobSingh CreditAttribution: JacobSingh commentedWhat version of styles were you using, any more information to go on? I know it seems like a pain, but I can't diagnose the problem unless I can get a reproducible case. Perhaps doing a fresh install now might give you something different?
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedI just tried re-enabling & I got this:
"PDOException: SQLSTATE[42000]: Syntax error or access violation: 1142 ALTER command denied to user 'username'@'localhost' for table 'file_managed': ALTER TABLE {file_managed} ADD `type` VARCHAR(50) NULL DEFAULT NULL COMMENT 'Type of file for use in Media Bundles'; Array ( ) in db_add_field() (line 2712 of /etc/drupal/7/includes/database/database.inc)."
I'm using v.7.x-2.0-alpha5 of Styles.
Comment #5
JacobSingh CreditAttribution: JacobSingh commentedYoure Mysql user does not have permissions to ALTER the table.
I recommend you google the error and read the mysql docs.
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedOK, I added the 'alter' permission for this user & the error goes away. Closing case. Thanks for the help.
Comment #7
saltednutSeeing this:
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'base.type' in 'field list': SELECT base.fid AS fid, base.uid AS uid, base.filename AS filename, base.uri AS uri, base.filemime AS filemime, base.filesize AS filesize, base.status AS status, base.timestamp AS timestamp, base.type AS type FROM {file_managed} base WHERE (base.fid IN (:db_condition_placeholder_0)) ; Array ( [:db_condition_placeholder_0] => 1669 ) in DrupalDefaultEntityController->load() (line 196 of /var/www/sites/sitename/includes/entity.inc).
Drupal's mysql user has all privileges. Is there something we're missing?
Comment #8
mpgeek CreditAttribution: mpgeek commented@brantwyn, are you really using version 7.x-1.0-beta3? If so, I'd recommend using the latest releases. If you still encounter this error, can clarify what steps caused you to see the error?
Comment #9
Devin Carlson CreditAttribution: Devin Carlson commentedI'm not able to duplicate this. If you're still having this issue, I'd suggest following the steps that seezee took, namely: