Getting below error, please suggest:

[INSERT INTO ost_attachment SET file_id = 34, type = 'D', object_id = 49]

Duplicate entry '49-34-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 (root)/include/class.dispatcher.php(145): DraftAjaxAPI->uploadInlineImage('49')<br />
#7 (root)/include/class.dispatcher.php(38): UrlMatcher->dispatch('49/attach', Array)<br />
#8 (root)/include/class.dispatcher.php(120): Dispatcher->resolve('49/attach', Array)<br />
#9 (root)/include/class.dispatcher.php(38): UrlMatcher->dispatch('/draft/49/attac...', NULL)<br />
#10 (root)/scp/ajax.php(289): Dispatcher->resolve('/draft/49/attac...')<br />
#11 {main}

Please help us to help you by reading and following the posting guidelines located in this thread: Please read before requesting assistance. The more information you give us the better we will be able to assist you. Thank you.

Environment details?
Version of osTicket?
Is this from opening a ticket in the UI or via email or via the Open Ticket API?

Please find below version details:

WebServer is Apache2.4
We are able to open the tickets, but this is getting triggered when copy-paste image or a table. Also, it does not appear in the compose box when copy-paste image or table.

These errors are fairly harmless, we have had them in our system since we started and maybe see 1 every couple of weeks.

They are somehow related to the saving of drafts with attachments or images attached, maybe something to do with redactor.

There are a few issues on github already including this recent one:
https://github.com/osTicket/osTicket/issues/4675

Provided these are only occasional and not every time you attempt to add an attachment I wouldn't be too worried.

Cheers.

    Hi,

    But these are getting generated when we are trying to copy-paste any image or table in the ticket. This feature is not working and generating these errors.

    Please suggest if this issue is resolved on OSTicket 1.11 version?

    ShailendraPhonon
    take a look at this post: https://github.com/osTicket/osTicket/issues/3481
    not sure if that will help fix your issue, it was for osTicket version 1.10

    \scp\js\scp.js
    after line 216: if(canned.response) {
    add: redactor.selection.restore();

    ----- update Redactor version ------
    js/redactor.min.js

    Redactor 10.2.2 Redactor 10.2.5
    Updated: July 15, 2015 Updated: October 1, 2015
    http://imperavi.com/redactor/ http://imperavi.com/redactor/

    Write a Reply...