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

Blooniverse’s picture

Issue summary: View changes

Updated issue summary.

Blooniverse’s picture

Issue summary: View changes

Updated issue summary.

Blooniverse’s picture

... refreshing the page '/admin/modules/list/confirm' then produces [as a DSM]:

·  Warning: Invalid argument supplied for foreach() in _drupal_schema_initialize() (line 313 of core/includes/schema.inc).
·  Notice: Undefined index: fields in Drupal\Core\Database\Driver\mysql\Schema->createTableSql() (line 99 of core/lib/Drupal/Core/Database/Driver/mysql/Schema.php).
·  Warning: Invalid argument supplied for foreach() in Drupal\Core\Database\Driver\mysql\Schema->createTableSql() (line 99 of core/lib/Drupal/Core/Database/Driver/mysql/Schema.php).
·  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 db_create_table() (Zeile 590 von /var/www/drupal8-spark/core/includes/database.inc).
·  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 core/lib/Drupal/Core/Database/Connection.php).
Blooniverse’s picture

... 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:

  $token_problems[$problem_key] = $problem['label'] . theme('item_list', array('items' => $problems));

with

  $token_problems[$problem_key] = $problem['label'] . implode('-', $problems);
Blooniverse’s picture

... 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.

mgifford’s picture

mgifford’s picture

Issue summary: View changes

Updated issue summary.

TR’s picture

Issue summary: View changes
Status: Active » Closed (cannot reproduce)

With 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.