When entering a custom token that has a long name, this error appears:
PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'name' at row 1: INSERT INTO {token_custom} (machine_name, name, description, type, php_content) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4); Array ( [:db_insert_placeholder_0] => pdoexception-sqlstate-22001-stri [:db_insert_placeholder_1] => PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'name' at row 1: INSERT INTO {token_c [:db_insert_placeholder_2] => sdsd [:db_insert_placeholder_3] => custom [:db_insert_placeholder_4] => dd ) in drupal_write_record() (line 6888 of /var/aegir/platforms/dev/theaim-base_01_beta2/includes/common.inc).
You do not get this error when you enter a shorter Token name.
Comments
Comment #1
gaspaio commentedI just pushed a correction on this. It was a bug in both 7.x-1.x and 7.x-2.x versions of custom tokens. The database schema reserved only 32 chars for the token name but the form field allowed for 128. It should now if you pull the latest version of 7.x-1.x (form the git repository) and run update.php .
Comment #2
gaspaio commentedI gess it's ok now.
Comment #3
gaspaio commented