Page 1 of 1

File attachment not showing up in ticket

Posted: Wed Jan 16, 2008 3:12 am
by Darrell
Script URL:
Version of script: 0.94.1
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:

Write your message below:

I added the .pub, to the Allowed file types and when my user uploads that attachment it doesn't show in the ticket, Just the paper clip icon appears. I look in the attachment directory and the attachment is there. Now I have tested other attachments and upload them and they appear in the ticket. Any idea what is going on here?

Thanks

Posted: Wed Jan 16, 2008 9:26 am
by Klemen
Not sure what the issue could be, I just tested it on this server and worked fine.

If you upload another .pub file has that one problems as well?
Can you check in the database (for example if you have phpMyAdmin) and see what info is logged for the attached file (hesk_attachments table)?

File Attachment not working

Posted: Wed Jan 16, 2008 5:37 pm
by Darrell
Klemen wrote:Not sure what the issue could be, I just tested it on this server and worked fine.


If you upload another .pub file has that one problems as well?
Yes I tried several different .pub files and they are in the attachment directory but do not show on the ticket.
Klemen wrote:Can you check in the database (for example if you have phpMyAdmin) and see what info is logged for the attached file (hesk_attachments table)?
The table shows no records at all in the hesk_attachments table.

Posted: Wed Jan 16, 2008 9:18 pm
by Klemen
So this is a problem for ALL files you try to attach, not just .pub ones?

You didn't edit any files, did you?
Did you upgrade your Hesk to 0.94.1 from a previous version (which one?) or did you do a clean install?

Posted: Wed Jan 16, 2008 10:05 pm
by Darrell
Klemen wrote:So this is a problem for ALL files you try to attach, not just .pub ones?
Just the .pub extension that I added in the database. I tested all other files and they show up.
Klemen wrote:You didn't edit any files, did you?
The only one I edited was submit_ticket.php and that was the ticket ID number. I changed it back to the original file and still the .pub files won't show up.
Klemen wrote:Did you upgrade your Hesk to 0.94.1 from a previous version (which one?) or did you do a clean install? It was a clean install. I am using php4 and mysql server 4

Posted: Thu Jan 17, 2008 9:07 am
by Klemen
What is the URL of your Hesk? I would like to test it myself and please make sure the original submit_ticket.php is there.

Posted: Thu Jan 17, 2008 12:49 pm
by Darrell
Klemen wrote:What is the URL of your Hesk? I would like to test it myself and please make sure the original submit_ticket.php is there.


Now last night it worked after I restarted apache so let me know if it works for you.

Posted: Thu Jan 17, 2008 2:33 pm
by Klemen
Works fine here.

Posted: Thu Jan 17, 2008 6:38 pm
by Darrell
Klemen wrote:Works fine here.
It works now very strange. Thanks for the help

Posted: Fri Jan 18, 2008 8:40 pm
by DC
Hi this is for anyone who modified the script as I have, theres a mod on the forum that allows you to have a clickable show hide reply ...
viewtopic.php?t=1466

If you use the mod as is it will not show you the download and will show only a paperclip, this is because the code given in the post is incorrect and must be updated. I ran into this glitch myself.


Replace this block

Code: Select all

if ($hesk_settings['attachments']['use'] && !empty($reply['attachments'])) {
    echo '<p><b>'.$hesklang['attachments'].':</b><br>';
    $att=explode('#####',substr($reply['attachments'], 0, -5));
    foreach ($att as $myatt) {
        echo '<img src="img/clip.gif" width="20" height="20"><a href="'.$myatt.'" target="_blank">'.substr(strstr($myatt, $trackingID),16).'</a><br>';
    }
    echo '</p>';
}

echo '</span></td></tr>';
} 


with this block

Code: Select all

if ($hesk_settings['attachments']['use'] && !empty($reply['attachments'])) {
    echo '<p><b>'.$hesklang['attachments'].':</b><br>';
    $att=explode(',',substr($reply['attachments'], 0, -1));
   
    foreach ($att as $myatt) {
    list($att_id, $att_name) = explode('#', $myatt);
    echo '<img src="img/clip.gif" width="20" height="20"><a href="download_attachment.php?att_id='.$att_id.'">'.$att_name.'</a><br>';
    
    }
    echo '</p>';
}

echo '</span></td></tr>';
} 
Hope that helps some of you out ...

DC