When adding attachments to a ticket response, the attachment is saved (to the file system using the 'Attachments on Filesystem' plugin), but the attachment is not linked to the ticket response.

The ost_file record:

I can locate this file in the filesystem and open it.

However, the attachment is not linked to the ticket response. Here is the query result:

This issue is intermittent and does not appear to be affected by the method of attachment (file dialog or drag and drop).

    Please help us to help you by reading and following the posting guidelines located in this thread: Please read before requesting assistance. The more information you give us the better we will be able to assist you. Thank you.

    Environment details? (see Admin panel -> Dashboard -> Information)

    Sorry, please see below:

    And the IIS Log:

    iis-log.zip
    4kB

    This issue is occurring on the Agent Panel side.

    Please upgrade to 1.15.6 or current (1.16.x) and retest.

    a year later

    FIASJason I am facing the same problem. My environment is as follows:

    osTicket Version: v1.17.3 (ca95150)
    Web Server Software: Apache/2.4.56 (Fedora Linux)
    MySQL Version: 8.0.30
    PHP Version: 8.1.17
    All PHP extensions installed and enabled. 
    
    **Note: I have commented Lines 3975 to 3977 of class.forms.php to fix the http 500 issue with zip attachments.**

    When I upload attachments to a new ticket or a ticket thread, randomly some attachment is not linked in the ticket after ticket creation or thread update. I check as you mentioned, the file is in the fileserver and is also in ost_file table, but the ticket does not contain the link to this attachment in the corresponding thread.

    There is no error in apache logs, php logs and osticket log.

    In some cases all attachments are attached correctly. The issue is random.

    Have you been able to get a solution to this problem?

      visham

      Sounds like you need to clear your cache, cookies, and sessions and retest. You can also try clearing the session table in the database (this will log everyone out) and try restarting MySQL and PHP-FPM (if you’re running it) to clear any server-side cache.

      Cheers.

        Hi,

        we are facing the same problem running latest osTicket version. Already tracked it down to a specific function, but didn't go any further at the moment. The files are posted back to the server using a hash like var-name, but then the parsing into the 'files' property fails (to be more specific - after this call (scp/tickets.php - line #174):

        $vars['files'] = $response_form->getField('attachments')->getFiles();

        this call should parse the attachments to the files array but it sometimes fails. the files var is still empty. so there might be a parsing issue in the getField('attachments') or getFiles method. Here's how the vars array (part of it) looks like after the above function call:

        [...]
          ["adfa0cbabfeb42"]=>
          array(2) {
            [0]=>
            string(54) "46752,file_name_1.pdf"
            [1]=>
            string(49) "43101,file_name_2.pdf"
          }
          ["signature"]=>
          string(4) "mine"
          ["reply_status_id"]=>
          string(1) "1"
          ["files"]=>
          array(0) {
          }
        [...]

        after a successfull parse it looks like this:

        10262   ["a79085951fc462"]=>
        10263   array(1) {
        10264     [0]=>
        10265     string(54) "46752,file_name_1.pdf"
        10266   }
        10267   ["signature"]=>
        10268   string(4) "mine"
        10269   ["reply_status_id"]=>
        10270   string(1) "3"
        10271   ["files"]=>
        10272   array(1) {
        10273     [0]=>
        10274     array(2) {
        10275       ["id"]=>
        10276       int(46752)
        10277       ["name"]=>
        10278       string(48) "file_name_1.pdf"
        10279     }
        10280   }

        We also suspect some timeout or so, but atm we don't fully understand the form-parsing process here (still need to dig deeper).

        Maybe thats a hint for someone whos more into this?

        Would appreciate solving this issue, as its pretty annoying ...

        thanks!

        Edit: added Screen of our install-specs:

          Write a Reply...