Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Enabling Token produces following error message [on a blank white page]:
Additional uncaught exception thrown while handling exception.
ORIGINAL
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Cache table for token info' at line 1: CREATE TABLE {cache_token} ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Cache table for token information.'; Array ( ) in Drupal\Core\Database\Connection->query() (line 554 of /var/www/drupal8-spark/core/lib/Drupal/Core/Database/Connection.php).
ADDITIONAL
Exception: theme() is not allowed to be called before all modules were loaded. in theme() (line 971 of /var/www/drupal8-spark/core/includes/theme.inc).
PS. I adapted the .info/.info.yml-file beforehand, obviously. See #1962358: Token Drupal 8 port.
Comments
Comment #0.0
Blooniverse CreditAttribution: Blooniverse commentedUpdated issue summary.
Comment #0.1
Blooniverse CreditAttribution: Blooniverse commentedUpdated issue summary.
Comment #1
Blooniverse CreditAttribution: Blooniverse commented... refreshing the page '/admin/modules/list/confirm' then produces [as a DSM]:
Comment #2
Blooniverse CreditAttribution: Blooniverse commented... the potential quick fix (dirty) from below does not work. I thought it was as easy as replacing line 23 of the file token.install:
with
Comment #3
Blooniverse CreditAttribution: Blooniverse commented... and, then, there seems to be another issue which has to do with the creation of the table 'cache_token'.
Hm, my time budget is over for the moment, sorry. Read u later.
Comment #4
mgiffordPossibly related issue #2044503: Devel fails to auto-generate content only with the forum module, producing these SQL errors
Comment #4.0
mgiffordUpdated issue summary.
Comment #5
TR CreditAttribution: TR commentedWith all the changes in D8 core and the Token module over the past two years, this seems to have resolved itself. I cannot reproduce this error with the latest D8 and Token -dev releases.
If it continues to be a problem for you feel free to reopen this.