Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
The module installs ok on my local development machine but throws the following error in a hosted environment:
DOException: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes: CREATE TABLE {field_data_field_cvm_cvm} ( `entity_type` VARCHAR(128) NOT NULL DEFAULT '' COMMENT 'The entity type this data is attached to', `bundle` VARCHAR(128) NOT NULL DEFAULT '' COMMENT 'The field instance bundle to which this row belongs, used when deleting a field instance', `deleted` TINYINT NOT NULL DEFAULT 0 COMMENT 'A boolean indicating whether this data item has been deleted', `entity_id` INT unsigned NOT NULL COMMENT 'The entity id this data is attached to', `revision_id` INT unsigned NULL DEFAULT NULL COMMENT 'The entity revision id this data is attached to, or NULL if the entity type is not versioned', `language` VARCHAR(32) NOT NULL DEFAULT '' COMMENT 'The language for this data item.', `delta` INT unsigned NOT NULL COMMENT 'The sequence number for this data item, used for multi-value fields', `field_cvm_cvm_view_mode` VARCHAR(255) NOT NULL COMMENT 'The view mode to use when context validates', `field_cvm_cvm_context` VARCHAR(255) NOT NULL COMMENT 'The context to authenticate against', PRIMARY KEY (`entity_type`, `entity_id`, `deleted`, `delta`, `language`), INDEX `entity_type` (`entity_type`), INDEX `bundle` (`bundle`), INDEX `deleted` (`deleted`), INDEX `entity_id` (`entity_id`), INDEX `revision_id` (`revision_id`), INDEX `language` (`language`), INDEX `field_cvm_cvm_view_mode` (`field_cvm_cvm_view_mode`), INDEX `field_cvm_cvm_context` (`field_cvm_cvm_context`), INDEX `field_cvm_cvm_view_context` (`field_cvm_cvm_view_mode`, `field_cvm_cvm_context`) ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Data storage for field 44 (field_cvm_cvm)'; Array ( ) in db_create_table() (line 2717 of /is/htdocs/wp11248269_BJ19LE475A/www/drupal7/includes/database/database.inc).
From what I learned from http://bugs.mysql.com/bug.php?id=4541 this issue is probably environment related.
Local:
- Windows XP SP3
- XAMPP 1.7.7
- PHP 5.3.8
- MySQL 5.5.16
Hosted:
- Linux
- PHP 5.3.27
- MySQL 5.5.30-1~dotdeb.0-log
Frank
Comment | File | Size | Author |
---|---|---|---|
#4 | contextual_view_modes-max_key_length-2159763-3.patch | 665 bytes | Frank Ralf |
Comments
Comment #1
Frank Ralf CreditAttribution: Frank Ralf commentedComment #2
Frank Ralf CreditAttribution: Frank Ralf commentedThe following issues might give some pointers:
Comment #3
Frank Ralf CreditAttribution: Frank Ralf commentedChanging the length in cvm_field.install from 255 to 128 as suggested in the above mentioned threads seems to do the trick.
Comment #4
Frank Ralf CreditAttribution: Frank Ralf commentedComment #6
sherakama CreditAttribution: sherakama commented