0

I recently created a D6 site to import some content using the D6-only import_html module, then upgraded it to D7 (in a slightly roundabout way I can describe, but shouldn't be relevant to the question). Since doing so, whenever I enable new modules and am sent to /admin/modules/list/confirm I see Drupal error messages like the following:

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'drupal7_gimported.cache_token' doesn't exist: TRUNCATE {cache_token} ; Array ( ) in cache_clear_all() (line 169 of /Users/tomash/Sites/drupal7/includes/cache.inc).

The modules do seem to install correctly, but the error is annoying and alarming. I would just copy a cache_imported table from a clean Drupal 7 install, but I wanted to check whether this is the right approach in general, and whether the error points to deeper problems.

Relevant information, which I can add to

  • I had the Token module installed in the Drupal 6 installation
  • I've enabled the Drupal 7 version in the upgraded Drupal 7 installation
  • I'm running this all on my localhost, which has rarely yielded errors before
2

After enabling back your module have you run update.php to ensure all needed queries are executed ?
It seems its the first update the token module runs.

/**
 * Add the cache_token table.
 */
function token_update_7000() {
  $schema['cache_token'] = drupal_get_schema_unprocessed('system', 'cache');
  $schema['cache_token']['description'] = 'Cache table for token information.';
  db_create_table('cache_token', $schema['cache_token']);
}
  • I'm afraid I can't replicate my own issue, but I'm accepted your answer as it sounds right... – tog22 Apr 20 '12 at 13:25
0

Just run http://example.com/update.php and you are done. Nothing is needed. But, keep in mind that you need to run after the modules are enabled even though it throws any error. If still it doesn't fix it go for a dev version of the module. Sometimes it helps me. :)

Not the answer you're looking for? Browse other questions tagged or ask your own question.