首页 / 帖子
装了imce ckeditor transliteration 模块报错

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] => 18 ) in DrupalDefaultEntityController->load() (line 191 of D:\WWW\me\includes\entity.inc).


网上看到要update.php 运行之后还是没有用,不知道有朋友解决过这个问题吗?

1个答案
发布于:2014-11-18 17:26
$spec = array(
   'description' => 'The type of this file.',
   'type' => 'varchar',
   'length' => 50,
   'not null' => TRUE,
   // If the FILE_TYPE_NONE constant ever changes, then change the value here
   // too, and add an update function to deal with existing records. The
   // constant isn't used here, because there may be cases where this function
   // runs without the module file loaded.
   'default' => 'undefined',
 );
  $indexes_new = array('indexes' => array('file_type' => array('type')));

db_add_field('file_managed', 'type', $spec, $indexes_new);