# Ticket Managment Error DB\_ERROR\_RECORD\_ALREADY\_EXISTS

**URL:** <https://www.dolibarr.org/forum/t/ticket-managment-error-db-error-record-already-exists/25342>\
**Category:** Other native modules\
**Created:** [May 17, 2024, 1:52pm UTC](https://www.dolibarr.org/forum/t/ticket-managment-error-db-error-record-already-exists/25342 "2024-05-17T13:52:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nickp](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/n/e79b87/32.png) [@nickp](https://www.dolibarr.org/forum/u/nickp)\
**Post date:** [May 17, 2024, 1:52pm UTC](https://www.dolibarr.org/forum/t/ticket-managment-error-db-error-record-already-exists/25342/1 "2024-05-17T13:52:34Z")

</div>

Hi All

We use Tickets module for managing customer queries etc.

I am getting this error from some tickets when opening the ticket to view it. (this one has the error warning 4 times - hence the (4))

Error DB\_ERROR\_RECORD\_ALREADY\_EXISTS : Duplicate entry ‘ticket/TS[##our ref##]-(4).-1’ for key ‘llxnl\_ecm\_files.uk\_ecm\_files’

Any ideas what causes it and how to fix it?

Thanks

Nick

---

<div class="post-metadata">

**Author:** ![nickp](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/n/e79b87/32.png) [@nickp](https://www.dolibarr.org/forum/u/nickp)\
**Post date:** [May 17, 2024, 2:23pm UTC](https://www.dolibarr.org/forum/t/ticket-managment-error-db-error-record-already-exists/25342/2 "2024-05-17T14:23:56Z")

</div>

Ahh! I think I’ve solved it myself!

We generate tickets from email imports. It appears embedded pictures in the emails are causing this. They come in as un named linked files - delete them and the error goes away.

Hopefully thats it!

Nick

---

<div class="post-metadata">

**Author:** ![caos30](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/caos30/32/6733_2.png) [@caos30](https://www.dolibarr.org/forum/u/caos30)\
**Post date:** [May 23, 2024, 8:40pm UTC](https://www.dolibarr.org/forum/t/ticket-managment-error-db-error-record-already-exists/25342/3 "2024-05-23T20:40:49Z")

</div>

@nickp , I am the developer of the new module (from 2024) Ticket Plus & Helpdesk, and what you have explained here suggests that I should review the case you have exposed: that one of the messages in a ticket thread contains an embedded image!

It’s unlikely that this would happen if the person who embedded the image did so by “copying and pasting” it from an email, but if they did it with an HTML tag like `<img />` then it could happen. And in these cases, it would be interesting if the image could be previewed when viewing the ticket.

There’s also the case where someone has simply pasted the URL of an image hosted on another website into the body of the message. But certainly, the web interface allows attaching images (and other files) to a ticket comment (in my module’s interface), so I highly doubt anyone would use it that way. But I will check if I can implement something that improves the usage in those cases.

Regards

> **[Ticket Plus & HelpDesk](https://www.dolistore.com/en/modules/2056-Ticket-Plus---HelpDesk.html)**
>
> Ticket Plus & HelpDesk
