| Anonymous | Login | Signup for a new account | 21-11-09 10:36 GMT |
| Main | My View | View Issues | Change Log | Roadmap | Docs |
| Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Print ] | ||||||
| ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||
| 0010828 | [phplist] Template Management | major | always | 30-07-07 09:05 | 18-02-08 14:08 | ||
| Reporter | sniffi | View Status | public | ||||
| Assigned To | |||||||
| Priority | normal | Resolution | fixed | ||||
| Status | resolved | Product Version | 2.10.4 | ||||
| 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 |
||||||
| Additional Information | |||||||
| Tags | No tags attached. | ||||||
| Attached Files | |||||||
|
|
|||||||
Relationships |
||||||
|
||||||
| Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |