Installed on drupal 7.8 ad 7.9 andreceived the following error after I check to install the media module
The website encountered an unexpected error. Please try again later.
When I go back and look at the module list I see the media module is unhecked.

Anything I can do to fix this? I need podcast functionality on my drupal 7 site fo audo mp3 files asap I did not know it was missingin drupal 7.

Thank you

Comments

Jim Ruby’s picture

Here is the error message I receive nowwhen I go to the front page of my site:
Error
Error message
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.origname AS origname, base.type AS type, base.uuid AS uuid FROM
{file_managed} base WHERE (base.fid IN (:db_condition_placeholder_0, :db_condition_placeholder_1,
:db_condition_placeholder_2, :db_condition_placeholder_3, :db_condition_placeholder_4,
:db_condition_placeholder_5, :db_condition_placeholder_6, :db_condition_placeholder_7,
:db_condition_placeholder_8, :db_condition_placeholder_9, :db_condition_placeholder_10,
:db_condition_placeholder_11)) ; Array ( [:db_condition_placeholder_0] => 471 [:db_condition_placeholder_1]
=> 475 [:db_condition_placeholder_2] => 485 [:db_condition_placeholder_3] => 492
[:db_condition_placeholder_4] => 493 [:db_condition_placeholder_5] => 494 [:db_condition_placeholder_6]
=> 497 [:db_condition_placeholder_7] => 498 [:db_condition_placeholder_8] => 499
[:db_condition_placeholder_9] => 500 [:db_condition_placeholder_10] => 501 [:db_condition_placeholder_11]
=> 502 ) in
DrupalDefaultEntityController->load() (line 196
of
/home/example/public_html/access/includes/entity.inc).
The website encountered an unexpected error. Please try again later.

erikwebb’s picture

It appears your File module's tables aren't installed correctly. If you uninstall Media, uninstall File, and try again, does the error happen again?

Jim Ruby’s picture

Yes, it does, I even went back to the backup db before I installed anything with the media module and still the same thig.

Jim Ruby’s picture

Anyone else have any suggestions? I really need to get podcast content and enclosures working asap and everything I try either don't work or won't install. bumbed.

erikwebb’s picture

Project: D7 Media » File Entity (fieldable files)
Version: 7.x-1.0-rc2 » 7.x-1.x-dev

The file_managed.type column is actually added by the File Entity module, so this isn't actually a Media problem at all. Redirecting to their issue queue for help.

dave reid’s picture

Category: bug » support
johnv’s picture

Title: The website encountered an unexpected error. Please try again later on installation » Error "The website encountered an unexpected error. Please try again later" on installation
Category: support » bug

I have the same error , and found that recreating the indices was the root of all evil. See below.
My table file_managed already has field 'type' and index 'file_type', as a remains of an old Media-module experiment.
I ended up removing the part of creating an index in 'type' , and blame $indexes_new.
This page says to explicitly drop the index, before recreating it. That is not done in the code.

function file_entity_install() {
  $schema = array();
  file_entity_schema_alter($schema);
  $spec = $schema['file_managed']['fields']['type'];
  $indexes_new = array('indexes' => $schema['file_managed']['indexes']);

  // If another module (e.g., Media) had added a {file_managed}.type field,
  // then change it to the expected specification. Otherwise, add the field.
  if (db_field_exists('file_managed', 'type')) {
    // db_change_field() will fail if any records have type=NULL, so update
    // them to the new default value.
    db_update('file_managed')->fields(array('type' => $spec['default']))->isNull('type')->execute();

    // Indexes using a field being changed must be dropped prior to calling
    // db_change_field(). However, the database API doesn't provide a way to do
    // this without knowing what the old indexes are. Therefore, it is the
    // responsibility of the module that added them to drop them prior to
    // allowing this module to be installed.

+ // The next line generates 3 errors %type: !message in %function (line %line of %file).
+// So split the line in 2 lines and recreate the indices separately.
+//    db_change_field('file_managed', 'type', 'type', $spec, $indexes_new); 
+    db_change_field('file_managed', 'type', 'type', $spec); 
+// db_add_index('file_managed' , 'type', 'type');
  }
dieppon’s picture

I have almost the same problem with EntityReference and the solution in the thread works. Im not sure if this could help you but it might point you in the right direction.

http://drupal.org/comment/reply/1309704

Thanks

devin carlson’s picture

Status: Active » Closed (cannot reproduce)

File entity has had a number of releases since the original issue report and I haven't been able to duplicate any installation problems.