| Anonymous | Login | Signup for a new account | 02-09-10 22:18 GMT | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Print ] | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |
| 0010828 | phplist | Template Management | public | 30-07-07 09:05 | 18-02-08 14:08 | |
| Reporter | sniffi | |||||
| Priority | normal | Severity | major | Reproducibility | always | |
| Status | resolved | Resolution | fixed | |||
| Platform | OS | OS Version | ||||
| Product Version | 2.10.4 | |||||
| Target Version | 2.10.7 | Fixed in Version | 2.10.5 | |||
| Summary | 0010828: Possible faulty insert; Database error 1062 while doing query Duplicate entry 'Untitled Template' for key 2 | |||||
| Description | When inserting a template with the name "Untitled Template" or when inserting a template fails for some reason you must manually delete the "untitled template" from the template list. This is caused in admin/template.php: if (!$id) { Sql_Query("insert into {$tables["template"]} (title) values(\"Untitled Template\")"); $id = Sql_Insert_id(); } Sql_Query(sprintf('update %s set title = "%s",template = "%s" where id = %d', $tables["template"],$title,addslashes($content),$id)); Why not insert with the right title in the first place? i guess it's related to editing or something. maybe its easier to just not mark the title field as unique, and check uniqueness manually | |||||
| Tags | No tags attached. | |||||
| Attached Files | ||||||
Relationships |
||||||
|
||||||
| Copyright © 2000 - 2010 MantisBT Group |