I'm a Drupal noob, but I've used Token (with Pathauto) in D.6 and had no problems at all. So I thought I should report this error I received when activating Token in D.7.
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'fairmont_drupal.cache_token' doesn't exist: TRUNCATE {cache_token} ; Array ( ) in cache_clear_all() (line 170 of /home/fairmont_admin/fairmontschool.org/includes/cache.inc).
I poked around looking for some code that would create these tables, but my cursory search turned up nothing, and I don't remember having to do anything like running SQL commands for Token under D.6.x.
Am I simply overlooking something in my configuration? Thanks.
Comments
Comment #1
dave reidDid you run update.php?
Comment #2
senortim commentedAh-so... Thanks for that! Not sure how all this is working, but I'll be sure to check the pending updates queue after installing future modules. Cheers!
Comment #3
aren cambre commentedI ran into the same problem when enabling Token and Pathauto simultaneously on an upgraded D6 instance. I guess Pathauto wants token's cache_token table, which isn't created until you run update.php.
Comment #4
dave reidDid it fix itself after you ran update.php??
Comment #5
aren cambre commentedNo.
Comment #6
dave reid@Aren: Did token_update_7000() get run at all when you upgraded or updated? It should have been if you performed a D6 -> D7 upgrade.
Comment #7
aren cambre commentedI'm sorry!! I looked at the wrong thing. Yes, it's fixed, so disregard my comment in #5.
Comment #8
dave reidAh thanks Aren for the update and confirmation that its fixed.
Comment #10
DrewMathers commentedI had the same issue after a D6 upgrade. I couldn't enable Token separately, so I couldn't use the update.php solution. I went into Modules > Uninstall and uninstalled Pathauto and Token. I was then able to enable them simultaneously without a problem.
Comment #11
simeonabiola commentedI am building a new site using Drupal 7, until keep getting this error message while trying
create some field in user's accounts. I have cleared all the cache, trying cron, and update script, yet the same error message. Where do go from here? Thanks
Here is the message
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'talkoauc_drup238.dr_cache_token' doesn't exist: TRUNCATE {cache_token} ; Array ( ) in cache_clear_all() (line 169 of /home/talkoauc/public_html/includes/cache.inc).
Thanks
Simeon
Comment #12
dave reidI'm not sure how this could happen on a new install. The cache_token table is clearly defined in token_schema().
Comment #13
simeonabiola commentedI think i would try a new installation. If i experience the same issue i will let you know
Thanks
Simeon
Comment #14
jbibbings commentedI am also encountering this issue upgrading Drupal from 7.7 to 7.12. I just upgraded to token 7.x-1.0-rc1 after running into this problem.
There is no cache_token table in the database, and there are no updates available. I tried disabling pathauto and token, and re-activating token, but I still receive this error. Even when I completely remove token, and re-download and install, I get this message when I try to re-activate.
Somewhere along the line it thinks I should have a cache_token table, but somehow it was never installed.
Comment #15
Masa Nishio commentedI had the same problem with D7.12 on my local installation.
I just turned off the Token module and saved the configuration, then I re-enabled it (to be exactly I also turned on the Pathauto module at the same time) and saved the configuration. Then the problem has disappeared.
Comment #16
giorgio79 commentedThis is still happening.
To reproduce try to flush all cache with admin menu.
Happens even after complete uninstall, reinstall.
Comment #17
giorgio79 commentedActually, lets make this critical as it breaks a Drupal site as cache clears fail with this PDOException, in addition for example when saving filefiled paths that use tokens , the file field config cannot be saved because I am getting this pdoexception.
Comment #18
giorgio79 commentedEh, after a second reinstall it seems to have created the cache_token table. Weird.
Comment #19
nategasser commentedIf anyone comes here looking for a solution to "cache_token' doesn't exist" errors -- restarting MySQL solved this for me.
That is all...