SQLSTATE[42000]: Syntax error or access violation

Created on 27 May 2019, over 5 years ago
Updated 4 September 2024, 5 months ago

I get a wsod on installing regcode. The log says:

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes: CREATE TABLE {regcode} ( `rid` INT unsigned NOT NULL auto_increment COMMENT 'RID', `uid` INT unsigned NULL DEFAULT NULL COMMENT 'User ID', `created` INT NULL DEFAULT NULL COMMENT 'Code creation time', `lastused` INT NULL DEFAULT NULL COMMENT 'Code last used time', `begins` INT NULL DEFAULT NULL COMMENT 'Code activation date', `expires` INT NULL DEFAULT NULL COMMENT 'Code expiry date', `code` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'The registration code', `is_active` INT unsigned NOT NULL DEFAULT 1 COMMENT 'Whether the code is active', `maxuses` INT unsigned NOT NULL DEFAULT 1 COMMENT 'Maximum times a code can be used', `uses` INT unsigned NOT NULL DEFAULT 0 COMMENT 'Number of times the code has been used', PRIMARY KEY (`rid`), UNIQUE KEY `code` (`code`) ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT 'Hold registration codes'; Array ( ) in drupal_install_schema() (line 122 of /var/www/profile.myclimateservices.eu/web/core/includes/schema.inc).

Set to critical since the module is not useable with that

πŸ› Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡¦πŸ‡ΉAustria FloGe

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024