- Edited
Hi, every time a ticket is created i get DB Error #1062 with alert email:
[INSERT INTO `LVti_thread_referral` SET `thread_id` = 158, `object_id` = 12, `object_type` = 'D', `created` = NOW()] Duplicate entry '12-D-158' for key 'ref'
---- Backtrace ----
#0 (root)/include/mysqli.php(199): osTicket->logDBError('DB Error #1062', '[INSERT INTO `L...')
#1 (root)/include/class.orm.php(3455): db_query('INSERT INTO `LV...', true, true)
#2 (root)/include/class.orm.php(658): MySqlExecutor->execute()
#3 (root)/include/class.thread.php(1824): VerySimpleModel->save()
#4 (root)/include/class.thread.php(362): ThreadReferral::create(Array)
#5 (root)/include/class.ticket.php(2602): Thread->refer(Object(Dept))
#6 (root)/include/class.thread.php(570): Ticket->systemReferral(Array)
#7 (root)/include/class.thread.php(844): Thread->postEmail(Array, Object(ThreadEntry))
#8 (root)/include/class.mailfetch.php(861): ThreadEntry->postEmail(Array)
#9 (root)/include/class.mailfetch.php(933): MailFetcher->createTicket(1)
#10 (root)/include/class.mailfetch.php(1013): MailFetcher->fetchEmails()
#11 (root)/include/class.cron.php(25): MailFetcher::run()
#12 (root)/include/class.cron.php(110): Cron::MailFetcher()
#13 (root)/include/api.cron.php(19): Cron::run()
#14 (root)/include/api.cron.php(40): CronApiController->run()
#15 (root)/api/cron.php(23): LocalCronApiController::call()
#16 {main}
How i can solve? I use the last stable release
v1.12.3 (bcf1a6f)
Web Server Software Apache
Versione MySQL 5.6.45
Versione PHP 7.3.7
Maybe this because i tried to add an image at the start of the ticket with the logo and this after a while doesn't work anymore so i was forced to delete the code line with the image from the text editor.
But now how i can stop this issue that send an alert email every time and do log on the registry?
I opened phpmyadmin than searched for ref and found LVti_thread_referral
here i have two lines - what i have to do?
Seems on every new ticket the object id is keept same so error comes.