I've got FileField, FileField Paths, and Transliteration installed on my Drupal 5.7 system.

I've created a FileField on a node type and submitted its settings. Then, I clicked "modify" to edit the settings again, changed FileFiled Paths values and clicked "Submit". A PHP error message appeared:

user warning: Duplicate entry 'filefield_paths_article_field_attachments_file_p' for key 1 query: INSERT INTO variable (name, value) VALUES ('filefield_paths_article_field_attachments_file_path_transliterate', 'i:0;') in /home/Altaisoft/site/ongnet/www/includes/database.mysql.inc on line 172.
user warning: Duplicate entry 'filefield_paths_article_field_attachments_file_n' for key 1 query: INSERT INTO variable (name, value) VALUES ('filefield_paths_article_field_attachments_file_name_tolower', 'i:1;') in /home/Altaisoft/site/ongnet/www/includes/database.mysql.inc on line 172.
user warning: Duplicate entry 'filefield_paths_article_field_attachments_file_n' for key 1 query: INSERT INTO variable (name, value) VALUES ('filefield_paths_article_field_attachments_file_name_transliterate', 'i:1;') in /home/Altaisoft/site/ongnet/www/includes/database.mysql.inc on line 172.

The settings weren't submitted.

I removed the listed rows from the database table 'variable', but with no result.

Comments

Altaisoft’s picture

Status: Active » Closed (fixed)

I now understand what the problem was. The field 'name' in Drupal database table 'variable' is of varchar(48) type. So, the names 'filefield_paths_article_field_attachments_file_path_tolower' and 'filefield_paths_article_field_attachments_file_path_transliterate' are both truncated to 'filefield_paths_article_field_attachments_file_p'.