We receive this error from the ticket system on a regular basis.
What is the cause and how can we remedy this?

[INSERT INTO ost_attachment SET file_id = 7158, type = 'D', object_id = 36502]

Duplicate entry '36502-7158-D' for key 'file-type'<br /> <br />
---- Backtrace ----<br />
#0 (root)/include/mysqli.php(199): osTicket->logDBError('DB Error #1062', '[INSERT INTO o...')<br />
#1 (root)/include/class.orm.php(3454): db_query('INSERT INTO
os...', true, true)<br />
#2 (root)/include/class.orm.php(658): MySqlExecutor->execute()<br />
#3 (root)/include/class.attachment.php(172): VerySimpleModel->save()<br />
#4 (root)/include/ajax.draft.php(101): GenericAttachments->upload(Array)<br />
#5 (root)/include/ajax.draft.php(301): DraftAjaxAPI->_uploadInlineImage(Object(Draft))<br />
#6 [internal function]: DraftAjaxAPI->uploadInlineImage('36502')<br />
#7 (root)/include/class.dispatcher.php(145): call_user_func_array(Array, Array)<br />
#8 (root)/include/class.dispatcher.php(38): UrlMatcher->dispatch('36502/attach', Array)<br />
#9 (root)/include/class.dispatcher.php(120): Dispatcher->resolve('36502/attach', Array)<br />
#10 (root)/include/class.dispatcher.php(38): UrlMatcher->dispatch('/draft/36502/at...', NULL)<br />
#11 (root)/scp/ajax.php(289): Dispatcher->resolve('/draft/36502/at...')<br />
#12 {main}

Error says that it went to add an attachment to the database, and found that the attachment already exists.
It should be safe to ignore these.

Write a Reply...