Jump to:
| Project: | Drupal core |
| Version: | x.y.z |
| Component: | user system |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
When updating the site configuration /admin/system/modules/user, when you try and save, there is an error due to the "name" field being too short for the "user_mail_welcome_approval_subject" variable. This is the error.
user error: Duplicate entry 'user_mail_welcome_approval_subje' for key 1
query: INSERT INTO variable (name, value) VALUES ('user_mail_welcome_approval_subject', 's:63:\"Account details for %username at %site (pending admin approval)\";') in /home/dirtbike/public_html/drupal/includes/database.mysql.inc on line 75.
I assume that this is because the system tries to delete the key "user_mail_welcome_approval_subject", which is not found, and then the new key is inserted, which is then a duplicate.
2 Possible fixes. Change the "user_mail_welcome_approval_subject" to be shorter, or increase the size of the name column in the table.
Deleting the key manually allows the settings to be saved.
Comments
#1
Patch in contributions/for_review/ (changes var name). I don't know if we should fix this by changing the db, though. 64 chars doesn't seem all that long when you start to name things in a verbose fashion.
#2
In addition to changing the var name, I'd like to see these huge
variables moved out of code and into the database. They should be
inserted at the end of database.mysql, pgsql, etc.
Those huge texts each appear twice in user.module
#3
#4