DeuxHuitHuit / multilingual_field

Multilingual Textbox field for Symphony CMS
http://symphonyextensions.com/extensions/multilingual_field/
Other
12 stars 13 forks source link

Symphony Fatal Database Error: Specified key was too long; max key length is 1000 bytes #83

Open wdebusschere opened 6 years ago

wdebusschere commented 6 years ago

Symphony 2.7.7 multilingual_field: 3.5.18 Textbox: 2.7.3 (not latest because of issue https://github.com/symphonists/textboxfield/issues/10)

An error occurred while attempting to execute the following query

CREATE TABLE IF NOT EXISTS `sym_entries_data_578` ( `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `entry_id` INT(11) UNSIGNED NOT NULL, `handle` VARCHAR(1024) DEFAULT NULL, `value` TEXT DEFAULT NULL, `value_formatted` TEXT DEFAULT NULL, `word_count` INT(11) UNSIGNED DEFAULT NULL,`handle-en` VARCHAR(1024) DEFAULT NULL,`value-en` TEXT DEFAULT NULL,`value_formatted-en` TEXT DEFAULT NULL,`word_count-en` INT(11) UNSIGNED DEFAULT NULL,`handle-pt` VARCHAR(1024) DEFAULT NULL,`value-pt` TEXT DEFAULT NULL,`value_formatted-pt` TEXT DEFAULT NULL,`word_count-pt` INT(11) UNSIGNED DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `entry_id` (`entry_id`),KEY `handle-en` (`handle-en`),FULLTEXT KEY `value-en` (`value-en`),FULLTEXT KEY `value_formatted-en` (`value_formatted-en`),KEY `handle-pt` (`handle-pt`),FULLTEXT KEY `value-pt` (`value-pt`),FULLTEXT KEY `value_formatted-pt` (`value_formatted-pt`), KEY `handle` (`handle`), FULLTEXT KEY `value` (`value`), FULLTEXT KEY `value_formatted` (`value_formatted`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
nitriques commented 6 years ago

This is when creating a new field ?

nitriques commented 6 years ago

I am not able to reproduce with textbox field 2.8.2

wdebusschere commented 6 years ago

Fixed with textbox field 2.8.2

wdebusschere commented 6 years ago

Got it again when adding a new multilanguage field to a section PhP 7.1 Mysql Server version: 5.7.23 symphony 2.7.7 textbox field 2.8.2 multilingual_field: 3.5.19

Symphony Fatal Database Error: Specified key was too long; max key length is 1000 bytes An error occurred while attempting to execute the following query

CREATE TABLE IF NOT EXISTS sym_entries_data_621 ( id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, entry_id INT(11) UNSIGNED NOT NULL, handle VARCHAR(1024) DEFAULT NULL, value TEXT DEFAULT NULL, value_formatted TEXT DEFAULT NULL, word_count INT(11) UNSIGNED DEFAULT NULL,handle-en VARCHAR(1024) DEFAULT NULL,value-en TEXT DEFAULT NULL,value_formatted-en TEXT DEFAULT NULL,word_count-en INT(11) UNSIGNED DEFAULT NULL,handle-pt VARCHAR(1024) DEFAULT NULL,value-pt TEXT DEFAULT NULL,value_formatted-pt TEXT DEFAULT NULL,word_count-pt INT(11) UNSIGNED DEFAULT NULL, PRIMARY KEY (id), UNIQUE KEY entry_id (entry_id),KEY handle-en (handle-en),FULLTEXT KEY value-en (value-en),FULLTEXT KEY value_formatted-en (value_formatted-en),KEY handle-pt (handle-pt),FULLTEXT KEY value-pt (value-pt),FULLTEXT KEY value_formatted-pt (value_formatted-pt), KEY handle (handle), FULLTEXT KEY value (value), FULLTEXT KEY value_formatted (value_formatted) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

wdebusschere commented 6 years ago

Update: this must be MySQL related.. works on another setup.. must be my default Mamp database configuration that is too strict..

wdebusschere commented 6 years ago

Update: setting SQL mode to nothing resolved it: sql_mode = '' Must be less strict now.. so no error.