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

problem with attachment in canned responses

Hi,
I have some canned responses that have attachments.
When an agent with extended access sends a response and adds another attachment, both are sent to the user.
However, when an agent with limited access does the same, only the 2nd attachment is sent.

Any ideas?

Comments

  • I am getting some support emails from osTicket that contains details about a DB error.
    The number of emails roughly corresponds to the agents sending responses with attachments not attaching succesfully.
    Could this be something to do with it?

    [INSERT INTO `ostyr_attachment` SET `file_id` = 29, `type` = 'D', `object_id` = 19, `name` = 'screenshot-7sak']

    Duplicate entry '19-29-D' for key 'file-type'<br />
    <br />
    ---- Backtrace ----<br />
    #0 (root)/include/mysqli.php(204): osTicket->logDBError('DB Error #1062', '[INSERT INTO `o...')<br />
    #1 (root)/include/class.orm.php(3133): db_query('INSERT INTO `os...', true, true)<br />
    #2 (root)/include/class.orm.php(597): MySqlExecutor->execute()<br />
    #3 (root)/include/class.attachment.php(161): VerySimpleModel->save()<br />
    #4 (root)/include/ajax.draft.php(101): GenericAttachments->upload(Array)<br />
    #5 (root)/include/ajax.draft.php(300): DraftAjaxAPI->_uploadInlineImage(Object(Draft))<br />
    #6 [internal function]: DraftAjaxAPI->uploadInlineImage('19')<br />
    #7 (root)/include/class.dispatcher.php(145): call_user_func_array(Array, Array)<br />
    #8 (root)/include/class.dispatcher.php(38): UrlMatcher->dispatch('19/attach', Array)<br />
    #9 (root)/include/class.dispatcher.php(120): Dispatcher->resolve('19/attach', Array)<br />
    #10 (root)/include/class.dispatcher.php(38): UrlMatcher->dispatch('/draft/19/attac...', NULL)<br />
    #11 (root)/scp/ajax.php(262): Dispatcher->resolve('/draft/19/attac...')<br />
    #12 {main}
  • Hi Nigel,

    Have you edited or altered the OSticket core files in any way? (mods, plugins etcetera)

    If not, do you experience the same issue after a clean install of OSticket.

    If yes however, i cannot help you in your problem due to the fact that the core files have been modified and hunting the problem is simply near impossible.

    Best regards,
    Nick
  • Hi Nick,

    No I have  not made any changes to core files in any way (mods, plugins etcetera).

    I just installed osTicket v1.10 and am using it as is after making any necessary changes to the settings via the Admin Panel.

  • Your best bet is to provide us more details about your environment such as; PHP Version, which SQL software you are using and what version, Apache/NGINX etc...
  • Does the attached screen-shot help for PHP and SQL info?

    From cpanel, how do I find out Apache/NGINX etc?

    image
  • I have removed all attachments from our canned responses and it is still happening.

    Here is the latest error message that I received this morning:

    [INSERT INTO `ostyr_attachment` SET `file_id` = 107, `type` = 'D', `object_id` = 141]

    Duplicate entry '141-107-D' for key 'file-type'<br />
    <br />
    ---- Backtrace ----<br />
    #0 (root)/include/mysqli.php(204): osTicket->logDBError('DB Error #1062', '[INSERT INTO `o...')<br />
    #1 (root)/include/class.orm.php(3133): db_query('INSERT INTO `os...', true, true)<br />
    #2 (root)/include/class.orm.php(597): MySqlExecutor->execute()<br />
    #3 (root)/include/class.attachment.php(161): VerySimpleModel->save()<br />
    #4 (root)/include/ajax.draft.php(101): GenericAttachments->upload(Array)<br />
    #5 (root)/include/ajax.draft.php(300): DraftAjaxAPI->_uploadInlineImage(Object(Draft))<br />
    #6 [internal function]: DraftAjaxAPI->uploadInlineImage('141')<br />
    #7 (root)/include/class.dispatcher.php(145): call_user_func_array(Array, Array)<br />
    #8 (root)/include/class.dispatcher.php(38): UrlMatcher->dispatch('141/attach', Array)<br />
    #9 (root)/include/class.dispatcher.php(120): Dispatcher->resolve('141/attach', Array)<br />
    #10 (root)/include/class.dispatcher.php(38): UrlMatcher->dispatch('/draft/141/atta...', NULL)<br />
    #11 (root)/scp/ajax.php(262): Dispatcher->resolve('/draft/141/atta...')<br />
    #12 {main}
  • edited May 8
    I too am getting this error. I am one of the agents who is attaching the files, occasionally I will take screenshots using the Snipping Tool on my computer, copy it and then paste it via Chrome directly into the ticket. This used to work well, but now when I do this I get the following error in the log files - 

    DB Error #1062
    [INSERT INTO `ost_attachment` SET `file_id` = 375, `type` = 'D', `object_id` = 8370, `name` ='screenshot-AZgP']
  • edited May 8
    Thx Loco, glad that someone else has got this problem as it means its not our setup.

    Here are our system details (just found out how to do this neatly!):

    osTicket Version v1.10 (901e5ea) — Up to date
    Web Server Software Apache
    MySQL Version 5.5.54
    PHP Version 5.4.45
    Screen Shot 2017-05-08 at 12.47.02 PM.png
    510 x 198 - 31K
  • The screenshot from the 5th of May suggest that you have a version of php but it seems that osticket is disagreeing on that, when it comes to php version the recommended version seems to be 5.6 for osticket 1.10.
    So first of i would suggest testing that.

    Can you post an exact example of how the co-worker with problem is configured?
  • edited May 8
    PHP should be at least 5.6.x for v1.10 of OSTicket. Try upgrading first then let us know the outcome @nigelfish
  • Thanks. I'll work out how to upgrade PHP and let you know.
Sign In or Register to comment.