Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

[resolved] Editing any ticket feed DB Error #1062

G'day all.

Long time user of osTicket. Thanks to all.

OS = Ubuntu 16.04.2 LTS
PHP = 7.0.20
MySQL =  10.0.31
Apache
osTicket = v1.10 (901e5ea)

Issue is that whenever I edit anything on the ticket (using the edit capability top right corner of each response or internal note) it comes back with a DB error #1062 and the edit window just hangs. A forced refresh of the webpage shows the edit was successful (although I would have thought that the edit would work in place of the original (sort of like Facebook does for comments) rather then show a completely new one below).

Here is the email that I get:

[UPDATE `osti_attachment` SET `object_id` = 7201 WHERE (`osti_attachment`.`type` = 'H' AND `osti_attachment`.`object_id` = 7197)]

Duplicate entry '7201-926-H' for key 'file-type'<br />
<br />
---- Backtrace ----<br />
#0 (root)/include/mysqli.php(204): osTicket->logDBError('DB Error #1062', '[UPDATE `osti_a...')<br />
#1 (root)/include/class.orm.php(3133): db_query('UPDATE `osti_at...', true, true)<br />
#2 (root)/include/class.orm.php(1304): MySqlExecutor->execute()<br />
#3 (root)/include/class.orm.php(1966): QuerySet->update(Array)<br />
#4 (root)/include/class.thread_actions.php(169): InstrumentedList->update(Array)<br />
#5 (root)/include/class.thread_actions.php(201): TEA_EditThreadEntry->updateEntry()<br />
#6 (root)/include/class.thread_actions.php(108): TEA_EditThreadEntry->trigger__post()<br />
#7 (root)/include/class.thread.php(1461): TEA_EditThreadEntry->trigger()<br />
#8 (root)/include/ajax.tickets.php(1092): ThreadEntry->triggerAction('edit')<br />
#9 (root)/include/class.dispatcher.php(145): TicketsAjaxAPI->triggerThreadAction('906', '7197', 'edit')<br />
#10 (root)/include/class.dispatcher.php(38): UrlMatcher->dispatch('906/thread/7197...', Array)<br />
#11 (root)/include/class.dispatcher.php(120): Dispatcher->resolve('906/thread/7197...', Array)<br />
#12 (root)/include/class.dispatcher.php(38): UrlMatcher->dispatch('/tickets/906/th...', NULL)<br />
#13 (root)/scp/ajax.php(262): Dispatcher->resolve('/tickets/906/th...')<br />
#14 {main}

Regards,
Steven Swarts
TechCare
Tagged:

Comments

This discussion has been closed.