{"action":"created","issue":{"url":"https://api.github.com/repos/osTicket/osTicket/issues/3193","repository_url":"https://api.github.com/repos/osTicket/osTicket","labels_url":"https://api.github.com/repos/osTicket/osTicket/issues/3193/labels{/name}","comments_url":"https://api.github.com/repos/osTicket/osTicket/issues/3193/comments","events_url":"https://api.github.com/repos/osTicket/osTicket/issues/3193/events","html_url":"https://github.com/osTicket/osTicket/issues/3193","id":159460826,"number":3193,"title":"DB Error #1062","user":{"login":"danielc1234","id":1151357,"avatar_url":"https://avatars.githubusercontent.com/u/1151357?v=3","gravatar_id":"","url":"https://api.github.com/users/danielc1234","html_url":"https://github.com/danielc1234","followers_url":"https://api.github.com/users/danielc1234/followers","following_url":"https://api.github.com/users/danielc1234/following{/other_user}","gists_url":"https://api.github.com/users/danielc1234/gists{/gist_id}","starred_url":"https://api.github.com/users/danielc1234/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielc1234/subscriptions","organizations_url":"https://api.github.com/users/danielc1234/orgs","repos_url":"https://api.github.com/users/danielc1234/repos","events_url":"https://api.github.com/users/danielc1234/events{/privacy}","received_events_url":"https://api.github.com/users/danielc1234/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-06-09T17:11:03Z","updated_at":"2016-06-21T18:28:25Z","closed_at":null,"body":"So we are getting more and more of these errors. Trying to figure out what is going on. We have the latest version.\r\nAny ideas would be greatly appreciated.\r\n\r\n\r\n[INSERT INTO `ost_attachment` SET `type` = 'H', `file_id` = 446, `inline` = 1]\r\n\r\nDuplicate entry '0-446-H' for key 'file-type'<br />\r\n<br />\r\n---- Backtrace ----<br />\r\n#0 (root)/include/mysqli.php(204): osTicket->logDBError('DB Error #1062', '[INSERT INTO `o...')<br />\r\n#1 (root)/include/class.orm.php(3095): db_query('INSERT INTO `os...', true, true)<br />\r\n#2 (root)/include/class.orm.php(589): MySqlExecutor->execute()<br />\r\n#3 (root)/include/class.thread.php(993): VerySimpleModel->save()<br />\r\n#4 (root)/include/class.thread.php(1001): ThreadEntry->saveAttachment(Array, 0)<br />\r\n#5 (root)/include/class.thread.php(1440): ThreadEntry->saveAttachments(Array)<br />\r\n#6 (root)/include/class.thread.php(1448): ThreadEntry::create(Array)<br />\r\n#7 (root)/include/class.thread.php(2299): ThreadEntry::add(Array)<br />\r\n#8 (root)/include/class.thread.php(2516): MessageThreadEntry::add(Array, Array)<br />\r\n#9 (root)/include/class.ticket.php(2297): ObjectThread->addMessage(Array, Array)<br />\r\n#10 (root)/include/class.ticket.php(2665): Ticket->postMessage(Array, 'Email')<br />\r\n#11 (root)/include/class.thread.php(408): Ticket->postThreadEntry('M', Array)<br />\r\n#12 (root)/include/class.thread.php(648): Thread->postEmail(Array, Object(ThreadEntry))<br />\r\n#13 (root)/include/class.mailfetch.php(775): ThreadEntry->postEmail(Array)<br />\r\n#14 (root)/include/class.mailfetch.php(844): MailFetcher->createTicket(1)<br />\r\n#15 (root)/include/class.mailfetch.php(924): MailFetcher->fetchEmails()<br />\r\n#16 (root)/include/class.cron.php(25): MailFetcher::run()<br />\r\n#17 (root)/include/class.cron.php(100): Cron::MailFetcher()<br />\r\n#18 (root)/include/api.cron.php(19): Cron::run()<br />\r\n#19 (root)/include/api.cron.php(12): CronApiController->run()<br />\r\n#20 (root)/include/class.dispatcher.php(145): CronApiController->execute()<br />\r\n#21 (root)/include/class.dispatcher.php(38): UrlMatcher->dispatch('cron', Array)<br />\r\n#22 (root)/include/class.dispatcher.php(120): Dispatcher->resolve('cron', Array)<br />\r\n#23 (root)/include/class.dispatcher.php(38): UrlMatcher->dispatch('/tasks/cron', NULL)<br />\r\n#24 (root)/api/http.php(35): Dispatcher->resolve('/tasks/cron')<br />\r\n#25 {main}\r\n"},"comment":{"url":"https://api.github.com/repos/osTicket/osTicket/issues/comments/227529210","html_url":"https://github.com/osTicket/osTicket/issues/3193#issuecomment-227529210","issue_url":"https://api.github.com/repos/osTicket/osTicket/issues/3193","id":227529210,"user":{"login":"greezybacon","id":672074,"avatar_url":"https://avatars.githubusercontent.com/u/672074?v=3","gravatar_id":"","url":"https://api.github.com/users/greezybacon","html_url":"https://github.com/greezybacon","followers_url":"https://api.github.com/users/greezybacon/followers","following_url":"https://api.github.com/users/greezybacon/following{/other_user}","gists_url":"https://api.github.com/users/greezybacon/gists{/gist_id}","starred_url":"https://api.github.com/users/greezybacon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greezybacon/subscriptions","organizations_url":"https://api.github.com/users/greezybacon/orgs","repos_url":"https://api.github.com/users/greezybacon/repos","events_url":"https://api.github.com/users/greezybacon/events{/privacy}","received_events_url":"https://api.github.com/users/greezybacon/received_events","type":"User","site_admin":false},"created_at":"2016-06-21T18:28:25Z","updated_at":"2016-06-21T18:28:25Z","body":"Did you sanitize the `oursite.com` part of the messages?"}}
{"actor":{"display_login":"greezybacon"}}